On Wed, 14 Aug 2019 12:04:03 -0400 Brian Reichert <reichert@xxxxxxxxxxx> wrote: > On Wed, Aug 14, 2019 at 04:19:46PM +0100, Simon McVittie wrote: > > On Wed, 14 Aug 2019 at 10:26:53 -0400, Brian Reichert wrote: > > Doesn't daemonize(1) make stdin, stdout and stderr point > > to /dev/null, instead of closing them? > > Looking at the source, yes, it does. > > > Expecting arbitrary subprocesses to cope gracefully with being > > invoked without the three standard fds seems likely to be a losing > > battle. I've implemented this myself, in dbus; it isn't a whole lot > > of code, but it also isn't something that I would expect the > > authors of all CLI tools to get right. > > I concede that reopening FD 0,1,2 is a good practice to insulate > against the issues you cite. > > I agree with your points; I code aggressively, and sometimes forget > others don't. I didn't know what you meant by this. Do you mean 'Aggressive Programming'? Is https://www.apharmony.com/software-sagacity/2014/10/principles-of-aggressive-programming/ a reasonable summary? > > smcv > > > > [1] I'm sure there are lots of other executables named daemon or > > daemonize in other OSs, and perhaps some of them get this wrong? > > -- > Brian Reichert <reichert@xxxxxxxxxxx> > BSD admin/developer at large _______________________________________________ systemd-devel mailing list systemd-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/systemd-devel