mirror of
https://github.com/troglobit/finit.git
synced 2026-10-18 10:59:34 +00:00
Slight cleanup of public API in helpers.c
Function renames: - set_procname() --> procname_set() - kill_procname() --> procname_kill() - get_pidname() --> pid_get_name() Also added three new helper functions, for external plugins: - pid_alive() - pidfile_poll() - pidfile_read() Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
1 parent
0d70fa4cf0
commit
ff73dab447
4 files changed
+253
-139
No files matched your search
@@ -87,7 +87,7 @@ void do_shutdown (int sig)
|
||||
static void shutdown_handler(int sig, siginfo_t *info, void *UNUSED(ctx))
|
||||
{
|
||||
_d("Rebooting on signal %d from %s (PID %d)",
|
||||
sig, get_pidname(info->si_pid, NULL, 0), info->si_pid);
|
||||
sig, pid_get_name(info->si_pid, NULL, 0), info->si_pid);
|
||||
|
||||
do_shutdown(sig);
|
||||
}
|
||||
@@ -106,14 +106,14 @@ static void chld_handler(int UNUSED(sig), siginfo_t *UNUSED(info), void *UNUSED(
|
||||
static void sigstop_handler(int sig, siginfo_t *info, void *UNUSED(ctx))
|
||||
{
|
||||
_d("Received SIGSTOP(%d) from %s (PID %d)",
|
||||
sig, get_pidname(info->si_pid, NULL, 0), info->si_pid);
|
||||
sig, pid_get_name(info->si_pid, NULL, 0), info->si_pid);
|
||||
touch(SYNC_STOPPED);
|
||||
stopped ++;
|
||||
}
|
||||
static void sigcont_handler(int sig, siginfo_t *info, void *UNUSED(ctx))
|
||||
{
|
||||
_d("Received SIGCONT(%d) from %s (PID %d)",
|
||||
sig, get_pidname(info->si_pid, NULL, 0), info->si_pid);
|
||||
sig, pid_get_name(info->si_pid, NULL, 0), info->si_pid);
|
||||
stopped = 0;
|
||||
remove(SYNC_STOPPED);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user