mirror of
https://github.com/optim-enterprises-bv/nDPId.git
synced 2025-10-30 01:42:22 +00:00
nDPIsrvd sighandler and cmd opt parser
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
This commit is contained in:
3
utils.c
3
utils.c
@@ -28,6 +28,7 @@ static int is_daemon_running(char const * const pidfile, pid_str ps)
|
||||
|
||||
if (read(pfd, ps, sizeof(pid_str)) <= 0)
|
||||
{
|
||||
close(pfd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -71,7 +72,7 @@ static int create_pidfile(char const * const pidfile)
|
||||
|
||||
int daemonize_with_pidfile(char const * const pidfile)
|
||||
{
|
||||
pid_str ps;
|
||||
pid_str ps = {};
|
||||
|
||||
if (daemonize != 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user