index
:
ndpi-daemon.git
Tiny nDPI based deep packet inspection daemons / toolkit.
log msg
author
committer
range
add/PF_RING
add/apple-bsd-port
add/config-file-support
add/event-io-abstraction
add/nDPId-UDP-endpoint
add/tls-proxy-support
add/tunnel-decoding
add/udp-aes256-gcm
main
ndpi-example-proposal
tmp
about
summary
refs
log
tree
commit
diff
path:
root
/
utils.c
diff options
context:
1
2
3
4
5
6
7
8
9
10
15
20
25
30
35
40
space:
include
ignore
mode:
unified
ssdiff
stat only
author
Toni Uhlig <matzeton@googlemail.com>
2023-01-27 01:39:03 +0100
committer
Toni Uhlig <matzeton@googlemail.com>
2023-01-27 01:39:03 +0100
commit
58439a676116baffb04a24a59ebae81780528327
(
patch
)
tree
f6eff64c94247cc125f11e4f8974f6eebffa30d7
/
utils.c
parent
5e313f43f956dd3a94c65529bad7a90d63c5a0e5
(
diff
)
Minor fixes.
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat
(limited to 'utils.c')
-rw-r--r--
utils.c
6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils.c b/utils.c
index fbdc2b79e..486387cb9 100644
--- a/
utils.c
+++ b/
utils.c
@@ -144,6 +144,12 @@ int daemonize_with_pidfile(char const * const pidfile)
if (daemonize != 0)
{
+ if (pidfile == NULL)
+ {
+ logger_early(1, "%s", "Missing pidfile.");
+ return 1;
+ }
+
if (is_daemon_running(pidfile, ps) != 0)
{
logger_early(1, "Pidfile %s found and daemon %s still running", pidfile, ps);