Pass prgbox exit code to main exit code
This commit is contained in:
parent
4c83f1817e
commit
cf0b4a1f45
@ -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