Re: ntpd(8): use safer dup3() instead of dup2()

2016-10-02 Thread Rafael Zalamena
On Sun, Oct 02, 2016 at 02:30:11PM -0700, Philip Guenther wrote: > On Sun, 2 Oct 2016, Rafael Zalamena wrote: > > This diff is an improvement and an attempt to fix the bug where the > > ntpd(8) not always stays running. > > > > During the review of syslogd fork+exec diff I noticed the use of dup3

Re: ntpd(8): use safer dup3() instead of dup2()

2016-10-02 Thread Philip Guenther
On Sun, 2 Oct 2016, Rafael Zalamena wrote: > This diff is an improvement and an attempt to fix the bug where the > ntpd(8) not always stays running. > > During the review of syslogd fork+exec diff I noticed the use of dup3() > and went to read its man page: dup2() doesn't always remove the CLOEX

ntpd(8): use safer dup3() instead of dup2()

2016-10-02 Thread Rafael Zalamena
This diff is an improvement and an attempt to fix the bug where the ntpd(8) not always stays running. During the review of syslogd fork+exec diff I noticed the use of dup3() and went to read its man page: dup2() doesn't always remove the CLOEXEC flag from the descriptor, so using dup3() is a bette