Skip to content

Commit

Permalink
Fix writing pid file in nfpcapd. #582
Browse files Browse the repository at this point in the history
  • Loading branch information
phaag committed Dec 12, 2024
1 parent a8f3ede commit 6b7b397
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/nfpcapd/nfpcapd.c
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,10 @@ int main(int argc, char *argv[]) {
}

if (pidfile) {
if (check_pid(pidfile) != 0 || write_pid(pidfile) == 0) pcap_close(packetParam.pcap_dev);
exit(EXIT_FAILURE);
if (check_pid(pidfile) != 0 || write_pid(pidfile) == 0) {
pcap_close(packetParam.pcap_dev);
exit(EXIT_FAILURE);
}
}

if (metricsocket && !OpenMetric(metricsocket, metricInterval)) {
Expand Down

0 comments on commit 6b7b397

Please sign in to comment.