weston-launch: return better value if weston dies because of a signal
authorPhilipp Brüschweiler <blei42@gmail.com>
Sun, 10 Mar 2013 14:14:01 +0000 (15:14 +0100)
committerKristian Høgsberg <krh@bitplanet.net>
Tue, 19 Mar 2013 18:28:23 +0000 (14:28 -0400)
commit7a3ec74cb61c0faae18dfec3782f58b91a193801
tree5aa207a0956d8c7b99d9784e6295b7c99d7a1018
parentff253129c5b7f2f841d50f3e5dce675b2d31464e
weston-launch: return better value if weston dies because of a signal

Before this commit, weston-launch returned 0 if weston was killed by a
signal. This makes it hard to automatically test weston by using
weston-launch, as there is no way to know why weston was terminated.

This commit makes weston-launch return 10+N instead, where N is the code
of the signal that terminated weston. 10 was chosen because it allows a
script to distinguish it from the case that weston-launch itself was
killed by a signal (128+N), and does not overlap the standard exit codes
defined in sysexits.h.

Partial fix for https://bugs.freedesktop.org/show_bug.cgi?id=60935. I
can't reproduce the SIGHUP using the fbdev backend.

v3: better commit message.
src/weston-launch.c