diff options
author | Kenny Levinsen <kl@kl.wtf> | 2022-03-03 14:44:06 +0100 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2022-03-03 17:52:21 +0100 |
commit | 8dc6a50d88dcabda3f35135eacf075d5f4a18281 (patch) | |
tree | b9df18ae6d07a5d01a210039e3374c6316efcd30 /libseat/backend | |
parent | 795cf169e779aa003a5f4e990d7c9d307132d570 (diff) |
builtin: Remove deathsig and log start/stop
Proper handling of client disconnect mean that we no longer need
deathsig handling.
Diffstat (limited to 'libseat/backend')
-rw-r--r-- | libseat/backend/seatd.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/libseat/backend/seatd.c b/libseat/backend/seatd.c index f55efe6..abcd2a5 100644 --- a/libseat/backend/seatd.c +++ b/libseat/backend/seatd.c @@ -600,25 +600,6 @@ const struct seat_impl seatd_impl = { }; #ifdef BUILTIN_ENABLED -#include <signal.h> - -static int set_deathsig(int signal); - -#if defined(__linux__) -#include <sys/prctl.h> - -static int set_deathsig(int signal) { - return prctl(PR_SET_PDEATHSIG, signal); -} -#elif defined(__FreeBSD__) -#include <sys/procctl.h> - -static int set_deathsig(int signal) { - return procctl(P_PID, 0, PROC_PDEATHSIG_CTL, &signal); -} -#else -#error Unsupported platform -#endif static struct libseat *builtin_open_seat(const struct libseat_seat_listener *listener, void *data) { int fds[2]; @@ -649,7 +630,7 @@ static struct libseat *builtin_open_seat(const struct libseat_seat_listener *lis res = 1; goto server_error; } - set_deathsig(SIGTERM); + log_info("Started embedded seatd"); while (server.running) { if (poller_poll(&server.poller) == -1) { log_errorf("Could not poll server socket: %s", strerror(errno)); @@ -661,6 +642,7 @@ static struct libseat *builtin_open_seat(const struct libseat_seat_listener *lis server_finish(&server); error: close(fd); + log_info("Stopped embedded seatd"); exit(res); } else { close(fds[0]); |