On 19/06/23 05:25 PM, Yury Shevchuk wrote: > # /usr/bin/nfcapd -D -P /var/run/nfcapd/default.pid -w /var/cache/nfdump -S1 > -b 120.0.1 -p 2055 -R 127.0.0.2 2055 > Segmentation fault > The patch (trivial) is attached.
Thanks. For the record, this is included in the much larger https://github.com/phaag/nfdump/commit/abfab42419117add44e1ea15ad9559d265642219#diff-c95665baa1999e70e29344d1dc05f3282cd1cf7f31b47341581cd1cf81b7d062R593 in v1.7.2 > A minor change in /etc/init.d/nfdump conffile (added return 0) fixes false > "failed!" message from "/etc/init.d/nfdump start" which appears on systems > using sysvinit-core rather than systemd. I really don't get what this code is supposed to do though. And I don't want to invest much time into sysvinit. From my understanding start-stop-daemon --start --quiet \ --pidfile "$PIDFILE" --exec "$NFCAPD" --test > /dev/null \ || return 1 First we run with --test. If start-stop-daemon returns zero (process not already running) we continue, else we return 1. So far so good. start-stop-daemon --start --quiet \ --pidfile "$PIDFILE" \ --exec "$NFCAPD" -- \ -D -P "$PIDFILE" \ $options \ || return 2 Now we really start it. If we can do it we continue, if we can't we return 2 (could not be started) sleep 1 start-stop-daemon --start --quiet \ --pidfile "$PIDFILE" --exec "$NFCAPD" --test > /dev/null \ && return 2 Now we basically test again if the daemon is already running. If it isn't, we return 2, At this point we have checked that 1 second after the start the process is still running, and can return 0. Could you please try the just uploaded 1.7.1-3 to verify the fix for both bugs? Bernhard