diff options
author | Nils ANDRÉ-CHANG <nils.andre.chang@gmail.com> | 2019-02-09 14:22:08 +0000 |
---|---|---|
committer | Nils ANDRÉ-CHANG <nils.andre.chang@gmail.com> | 2019-02-21 19:52:55 +0000 |
commit | 72ccd341fc07476137fea00d67cf7a61d3c99098 (patch) | |
tree | a5610fea5588f371e6dfb86b1ccf3d5e2ffc4fbd /i3-msg | |
parent | e2d6117b8c2cef91c5209eac3e5b0721b3522eb0 (diff) | |
download | i3-72ccd341fc07476137fea00d67cf7a61d3c99098.tar.gz i3-72ccd341fc07476137fea00d67cf7a61d3c99098.zip |
Add proper return code for i3-msg
Diffstat (limited to 'i3-msg')
-rw-r--r-- | i3-msg/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/i3-msg/main.c b/i3-msg/main.c index fe111416..0ada5f64 100644 --- a/i3-msg/main.c +++ b/i3-msg/main.c @@ -67,6 +67,7 @@ typedef struct reply_t { char *errorposition; } reply_t; +static int exit_code = 0; static reply_t last_reply; static int reply_boolean_cb(void *params, int val) { @@ -100,6 +101,7 @@ static int reply_end_map_cb(void *params) { fprintf(stderr, "ERROR: %s\n", last_reply.errorposition); } fprintf(stderr, "ERROR: %s\n", last_reply.error); + exit_code = 2; } return 1; } @@ -326,5 +328,5 @@ int main(int argc, char *argv[]) { close(sockfd); - return 0; + return exit_code; } |