Browse Source

misccoms.c, com_quit(), implement exitcode

rlar 14 years ago
parent
commit
6ae6223250
  1. 5
      src/frontend/misccoms.c

5
src/frontend/misccoms.c

@ -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…
Cancel
Save