seatd-launch: print unlink/kill errors

Makes it easier to find out that something went wrong.
This commit is contained in:
Simon Ser 2021-09-13 09:59:46 +00:00 committed by Kenny Levinsen
parent fe600eac2b
commit 4e3b7b3bb6

View file

@ -161,8 +161,12 @@ int main(int argc, char *argv[]) {
} }
} }
unlink(sockpath); if (unlink(sockpath) != 0) {
kill(seatd_child, SIGTERM); perror("Could not unlink socket");
}
if (kill(seatd_child, SIGTERM) != 0) {
perror("Could not kill seatd");
}
if (WIFEXITED(status)) { if (WIFEXITED(status)) {
return WEXITSTATUS(status); return WEXITSTATUS(status);