Change exit status
The patch below adds support for an "exit_status" variable which
controls the exit status of mutt.
Index: globals.h
===================================================================
RCS file: /home/roessler/cvs/mutt/globals.h,v
retrieving revision 3.6
diff -u -r3.6 globals.h
--- globals.h 15 Jul 2003 11:41:32 -0000 3.6
+++ globals.h 6 Oct 2003 06:23:24 -0000
@@ -141,6 +141,7 @@
WHERE unsigned short Counter INITVAL (0);
WHERE short ConnectTimeout;
+WHERE short ExitStatus;
WHERE short HistSize;
WHERE short PagerContext;
WHERE short PagerIndexLines;
Index: init.h
===================================================================
RCS file: /home/roessler/cvs/mutt/init.h,v
retrieving revision 3.40
diff -u -r3.40 init.h
--- init.h 4 Sep 2003 15:10:09 -0000 3.40
+++ init.h 6 Oct 2003 06:23:25 -0000
@@ -515,6 +515,12 @@
** .pp
** Escape character to use for functions in the builtin editor.
*/
+ { "exit_status", DT_NUM, R_NONE, UL &ExitStatus, 0 },
+ /*
+ ** .pp
+ ** When set, the number is used as the exit status that is returned to the
+ ** process which has invoked mutt.
+ */
{ "fast_reply", DT_BOOL, R_NONE, OPTFASTREPLY, 0 },
/*
** .pp
Index: main.c
===================================================================
RCS file: /home/roessler/cvs/mutt/main.c,v
retrieving revision 3.15
diff -u -r3.15 main.c
--- main.c 3 Mar 2003 14:01:06 -0000 3.15
+++ main.c 6 Oct 2003 06:23:26 -0000
@@ -911,5 +911,5 @@
mutt_endwin (Errorbuf);
}
- exit (0);
+ exit (ExitStatus);
}