Pass prgbox exit code to main exit code

This commit is contained in:
Andrey A. Chernov 1995-02-13 19:49:42 +00:00
parent 7b5de861cd
commit 21edcfa248
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6346
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) {