qrexec: fix handling of remote exit code

This commit is contained in:
Marek Marczykowski-Górecki 2015-02-11 16:11:38 +01:00
parent d031126737
commit 61eb2e7764

View File

@ -374,10 +374,7 @@ static void handle_vchan_data(libvchan_t *vchan)
case MSG_DATA_EXIT_CODE: case MSG_DATA_EXIT_CODE:
libvchan_close(vchan); libvchan_close(vchan);
status = *(unsigned int *) buf; status = *(unsigned int *) buf;
if (WIFEXITED(status)) do_exit(status);
do_exit(WEXITSTATUS(status));
else
do_exit(255);
break; break;
default: default:
fprintf(stderr, "unknown msg %d\n", hdr.type); fprintf(stderr, "unknown msg %d\n", hdr.type);