Pass prgbox exit code to main exit code
This commit is contained in:
parent
7b5de861cd
commit
21edcfa248
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=6346
@ -7,6 +7,6 @@ $DIALOG --title "PROGRAM BOX: 'cal'" --clear \
|
||||
case $? in
|
||||
0)
|
||||
echo "OK";;
|
||||
255)
|
||||
echo "ESC pressed.";;
|
||||
*)
|
||||
echo "Exit code:" $?;;
|
||||
esac
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user