Re: [PATCH] run-command: simplify wait_or_whine

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH] run-command: simplify wait_or_whine

From: Thomas Rast <hidden>
Date: 2016-06-15 22:57:31

Felipe Contreras [off-list ref] writes:
Nobody is checking for specific error codes; it's the errno that's
important.
[...]
-		/*
-		 * This return value is chosen so that code & 0xff
-		 * mimics the exit code that a POSIX shell would report for
-		 * a program that died from this signal.
-		 */
-		code += 128;
Have you checked the callers?  There are lots of callers of
finish_command(), which returns the value from wait_or_whine()
unmodified.

-- 
Thomas Rast
trast@{inf,student}.ethz.ch

Re: [PATCH] run-command: simplify wait_or_whine

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:57:31

On Sat, Jun 1, 2013 at 9:19 AM, Thomas Rast [off-list ref] wrote:
Felipe Contreras [off-list ref] writes:
quoted
Nobody is checking for specific error codes; it's the errno that's
important.
[...]
quoted
-             /*
-              * This return value is chosen so that code & 0xff
-              * mimics the exit code that a POSIX shell would report for
-              * a program that died from this signal.
-              */
-             code += 128;
Have you checked the callers?  There are lots of callers of
finish_command(), which returns the value from wait_or_whine()
unmodified.
Yes I did. Most of them simply check that the number is not zero.

However, that was at the time I wrote the patch, and it seems there's
now one instance where the code is checked.

-- 
Felipe Contreras
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help