aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--man/seatd-launch.1.scd8
-rw-r--r--seatd-launch/seatd-launch.c4
2 files changed, 11 insertions, 1 deletions
diff --git a/man/seatd-launch.1.scd b/man/seatd-launch.1.scd
index d882ba5..9234203 100644
--- a/man/seatd-launch.1.scd
+++ b/man/seatd-launch.1.scd
@@ -38,6 +38,14 @@ superior to it for two reasons:
. The specified command never runs as root
. The standard seatd executable and libseat backend is used
+# EXIT STATUS
+
+seatd-launch exits with the status of its child. When the child terminates on
+a signal _N_, seatd-launch exits with the status 128 + _N_.
+
+If seatd-launch fails because of another error, it exits with a non-zero
+status.
+
# SEE ALSO
The libseat library, *<libseat.h>*, *seatd*(1)
diff --git a/seatd-launch/seatd-launch.c b/seatd-launch/seatd-launch.c
index 1877c98..ba61f5d 100644
--- a/seatd-launch/seatd-launch.c
+++ b/seatd-launch/seatd-launch.c
@@ -166,8 +166,10 @@ int main(int argc, char *argv[]) {
if (WIFEXITED(status)) {
return WEXITSTATUS(status);
+ } else if (WIFSIGNALED(status)) {
+ return 128 + WTERMSIG(status);
} else {
- return 1;
+ abort(); // unreachable
}
error_seatd: