Pass prgbox exit code to main exit code

This commit is contained in:
ache 1995-02-13 19:49:42 +00:00
parent 4c83f1817e
commit cf0b4a1f45
2 changed files with 4 additions and 3 deletions

View File

@ -7,6 +7,6 @@ $DIALOG --title "PROGRAM BOX: 'cal'" --clear \
case $? in
0)
echo "OK";;
255)
echo "ESC pressed.";;
*)
echo "Exit code:" $?;;
esac

View File

@ -80,6 +80,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/wait.h>
#include <dialog.h>
void Usage(unsigned char *name);
@ -189,7 +190,7 @@ int main(int argc, unsigned char *argv[])
if (clear_screen) /* clear screen before exit */
dialog_clear();
end_dialog();
return retval;
return WEXITSTATUS(retval);
}
else if (!strcmp(argv[offset+1], "--infobox")) {
if (argc-offset != 5) {