diff options
author | Keuin <[email protected]> | 2021-12-30 12:30:01 +0800 |
---|---|---|
committer | Keuin <[email protected]> | 2021-12-30 12:30:01 +0800 |
commit | 228149fc475948fe33085d7d157481cb923e4c11 (patch) | |
tree | 29a7979ae541f772e66a5e2f7045ccb5a3c8e124 /netmon.c | |
parent | b3fd60e6407b3af029672218b0bff7bb30e7a9d9 (diff) |
Fix one compiler warning.v1.1.0
Diffstat (limited to 'netmon.c')
-rw-r--r-- | netmon.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -43,7 +43,11 @@ void daemonize() { log_error(logger, "setsid() failed."); exit(1); } - chdir("/"); + if (chdir("/")) { + perror("chdir()"); + log_error(logger, "chdir() failed,"); + exit(1); + } close(STDIN_FILENO); close(STDOUT_FILENO); close(STDERR_FILENO); |