mirror of
https://github.com/troglobit/finit.git
synced 2026-10-25 12:04:36 +00:00
Revert new experimental libev backend due to time constraints
Due to time constraints I had to revert the new libev backend to the
service, I/O and signals monitor. Employed instead is the tried and
tested signals based service monitor, with a small extension for an
additional I/O monitor using poll() for the I/O plugins to use.
Tried restoring the startx finit.conf directive on top of the service
implementation. However, it's currently not usable to run /usr/bin/startx
for any other user than root. I recommend using the examples/finit.conf
and run /usr/sbin/gdm instead.
finit.c:
New run_loop() function, replaces libev ev_run().
helpers.c:
Refactor start_process() into svc_start().
plugin.c:
Add fds[] array for use in the io_monitor() called by the
new run_loop().
signal.c:
Ignore SIGCHLD. Handled by waitpid() in svc_monitor() now,
which is called by the new run_loop().
svc.c:
svc_register(): Optional @username parsing for the command line.
svc_monitor(): Replaced libev callback with waitpid()
svc_start(): Refactored to use most of helpers.c:start_process()
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
75eb5cc043
commit
c49d89dfe0
13 files changed
+198
-131
No files matched your search
@@ -98,13 +98,7 @@ static void shutdown_handler(int sig, siginfo_t *info, void *UNUSED(ctx))
|
||||
*/
|
||||
static void chld_handler(int UNUSED(sig), siginfo_t *UNUSED(info), void *UNUSED(ctx))
|
||||
{
|
||||
int status;
|
||||
|
||||
// _d("Child %d died due to signal %d, harvesting.", info->si_pid, sig);
|
||||
while (waitpid(-1, &status, WNOHANG) != 0) {
|
||||
if (errno == ECHILD)
|
||||
break;
|
||||
}
|
||||
/* Do nothing, the svc_monitor() is the designated child reaper. */
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user