Hi Rob,
-w is a good idea and I will implement it.
Regarding the daemon function, AFAIK it is not available on all systems and does not have a standardized behavior. I wrote the code as portable as possible (e.g. static memory allocations, minimal needed libraries). Since the only action on the parent is exit(), I don't think that waiting time is relevant.
Thank you for your input.
Marius, YO2LOJ
-----Original Message----- From: 44net-bounces+marius=yo2loj.ro@hamradio.ucsd.edu [mailto:44net-bounces+marius=yo2loj.ro@hamradio.ucsd.edu] On Behalf Of Rob Janssen Sent: Tuesday, February 11, 2014 23:16 To: 44net@hamradio.ucsd.edu Subject: Re: [44net] ampr-ripd 1.8 released
(Please trim inclusions from previous messages) _______________________________________________ When you make another version, consider:
- a -w option to set the window (now fixed at 840), setting 0 means no window setting.
- in the section to become a daemon, make use of the daemon() function. e.g.:
if (FALSE == debug) { if (daemon(0,verbose)<0) { PERROR("Can not become a daemon"); } }
The advantage is that the program detaches from the terminal, which is required when you want to start it in a /etc/init.d script and do not want to keep init waiting for the program.
Rob