Subject: timeout: document the exit status when run with "-s KILL"

From: Rodrigo Campos <[email-masked]>
Date: Wed, 29 Feb 2012 11:49:47 -0300

Hi,

Please keep me in Cc: since I'm not subscribed.

I find out that the exit code when a command times out is 128+9 (when run
instede timeout :-D) rather than 124 when is run with "-s KILL". I found this by
looking at the code (well, comments :)) where is pretty clear.

This patch just adds this to the man page, so no one else checks for 124 and
finds out it doesn't exit with that code :)

I tried to copy the first line from other commits, but I might misunderstood the
style. Also, I didn't compile test it, but it seems simple enough. Sorry in
advance if the style is wrong or introduces a build issue. Please let me know
and I'll fix it :S

Thanks a lot,
Rodrigo
>From c02e417956fc300e17ef2c145bc87f7b6992c92d Mon Sep 17 00:00:00 2001
From: Rodrigo Campos <[email-masked]>
Date: Wed, 29 Feb 2012 11:36:18 -0300
Subject: [PATCH] maint: timeout: document the exit status when run with "-s
 KILL"

Although it was documented in code comments, it was not properly
documented on the man page.
---
 src/timeout.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/timeout.c b/src/timeout.c
index 73367c4..17f610c 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -236,7 +236,9 @@ If the command times out, then exit with status 124.  Otherwise, exit\n\
 with the status of COMMAND.  If no signal is specified, send the TERM\n\
 signal upon timeout.  The TERM signal kills any process that does not\n\
 block or catch that signal.  For other processes, it may be necessary to\n\
-use the KILL (9) signal, since this signal cannot be caught.\n"), stdout);
+use the KILL (9) signal, since this signal cannot be caught.\n
+Also, if the KILL (9) signal is used, the exit status when the command times\n
+out is 128+9 rather than 124.\n"), stdout);
       emit_ancillary_info ();
     }
   exit (status);
-- 
1.7.9