misccoms.c, com_quit(), implement exitcode
This commit is contained in:
parent
5436de5bab
commit
6ae6223250
|
|
@ -41,9 +41,14 @@ com_quit(wordlist *wl)
|
|||
(wl && wl->wl_word && cieq(wl->wl_word, "noask")) ||
|
||||
cp_getvar("noaskquit", CP_BOOL, NULL);
|
||||
|
||||
int exitcode = 0;
|
||||
|
||||
gr_clean();
|
||||
cp_ccon(FALSE);
|
||||
|
||||
if(wl && wl->wl_word && 1 == sscanf(wl->wl_word, "%d", &exitcode))
|
||||
exit(exitcode);
|
||||
|
||||
/* Make sure the guy really wants to quit. */
|
||||
if (!ft_nutmeg && !noask) {
|
||||
for (cc = ft_circuits; cc; cc = cc->ci_next)
|
||||
|
|
|
|||
Loading…
Reference in New Issue