diff options
author | Simon Ser <contact@emersion.fr> | 2021-09-13 09:59:46 +0000 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2021-09-13 13:40:00 +0200 |
commit | 4e3b7b3bb605daf7337db0c922904c251c58289a (patch) | |
tree | 87b6605a9067a4f98dbf37012b2c31a2600e582c /seatd-launch/seatd-launch.c | |
parent | fe600eac2be9bd09d6c9746cf273a7eaed4e6f7f (diff) |
seatd-launch: print unlink/kill errors
Makes it easier to find out that something went wrong.
Diffstat (limited to 'seatd-launch/seatd-launch.c')
-rw-r--r-- | seatd-launch/seatd-launch.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/seatd-launch/seatd-launch.c b/seatd-launch/seatd-launch.c index ba61f5d..b9d33d7 100644 --- a/seatd-launch/seatd-launch.c +++ b/seatd-launch/seatd-launch.c @@ -161,8 +161,12 @@ int main(int argc, char *argv[]) { } } - unlink(sockpath); - kill(seatd_child, SIGTERM); + if (unlink(sockpath) != 0) { + perror("Could not unlink socket"); + } + if (kill(seatd_child, SIGTERM) != 0) { + perror("Could not kill seatd"); + } if (WIFEXITED(status)) { return WEXITSTATUS(status); |