Merge lp:~andrea.corbellini/beeseek/sniffer-daemon into lp:beeseek

Proposed by Andrea Corbellini
Status: Merged
Merged at revision: 39
Proposed branch: lp:~andrea.corbellini/beeseek/sniffer-daemon
Merge into: lp:beeseek
Diff against target: 0 lines
To merge this branch: bzr merge lp:~andrea.corbellini/beeseek/sniffer-daemon
Reviewer Review Type Date Requested Status
Lorenzo Allegrucci Approve
Review via email: mp+29408@code.launchpad.net

Description of the change

The aim of this branch is to make the sniffer a daemon that runs in the background. To achieve this I've added a --background option. Only if this option is set the sniffer will run daemonic. I've also refactored a bit the existing options, see --help.

To post a comment you must log in.
Revision history for this message
Andrea Corbellini (andrea.corbellini) wrote :

Oh, I forgot to say that the only way to stop a daemonic sniffer is to send it either SIGINT, SIGQUIT or the classic SIGKILL.

Revision history for this message
Lorenzo Allegrucci (l-allegrucci) wrote :

The daemon creates a zombie process:
16330 ? Ss 0:00 ./beeseek-sniffer -a localhost -b eth1
16331 ? Z 0:00 [beeseek-sniffer] <defunct>

maybe you have to use exit(), not "return" after the two forks.
http://netzmafia.de/skripten/unix/linux-daemon-howto.html

42. By Andrea Corbellini

Ignore SIGCHLD.

43. By Andrea Corbellini

Do some more error checking.

Revision history for this message
Lorenzo Allegrucci (l-allegrucci) wrote :

zombie problem fixed

review: Approve

Preview Diff

Empty

Subscribers

People subscribed via source and target branches