]> git.e2factory.org Git - e2factory.git/commit
e2lib: fix e2lib.wait() for signaled process
authorTobias Ulmer <tu@emlix.com>
Tue, 24 Apr 2018 12:58:32 +0000 (14:58 +0200)
committerTobias Ulmer <tu@emlix.com>
Tue, 24 Apr 2018 16:28:19 +0000 (18:28 +0200)
commitfe9af338afd6e0ff5eb5131c5f80ad7c5c1e3774
tree1275cf4ca2758ef4a9ad09c77eb24640a741d952
parent6f34b1d904998958cc8d31d5d52bfa30aa60fd80
e2lib: fix e2lib.wait() for signaled process

wait() returned 0 for a signaled process, expecting the caller to
check the third argument for a signal code.

Most call sites do not observe the signal argument, leading to
"successful" execution of a crashing process.

wait() will now return the exit code or signal + 128 in the first
argument. This is in line with various shells.

Also improve debug logging around wait() and callcmd().

Signed-off-by: Tobias Ulmer <tu@emlix.com>
Changelog
generic/e2lib.lua
generic/le2lib.c