From 4e3b7b3bb605daf7337db0c922904c251c58289a Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 13 Sep 2021 09:59:46 +0000 Subject: seatd-launch: print unlink/kill errors Makes it easier to find out that something went wrong. --- seatd-launch/seatd-launch.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'seatd-launch') 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); -- cgit v1.2.3