From 61eb2e77640b8693c4e98eb07e4239c7ea91496a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 11 Feb 2015 16:11:38 +0100 Subject: [PATCH] qrexec: fix handling of remote exit code --- qrexec/qrexec-client.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/qrexec/qrexec-client.c b/qrexec/qrexec-client.c index 8ceeffd..d3a4560 100644 --- a/qrexec/qrexec-client.c +++ b/qrexec/qrexec-client.c @@ -374,10 +374,7 @@ static void handle_vchan_data(libvchan_t *vchan) case MSG_DATA_EXIT_CODE: libvchan_close(vchan); status = *(unsigned int *) buf; - if (WIFEXITED(status)) - do_exit(WEXITSTATUS(status)); - else - do_exit(255); + do_exit(status); break; default: fprintf(stderr, "unknown msg %d\n", hdr.type);