[naemon-dev] commands.c question

Andreas Ericsson ageric79 at gmail.com
Thu Feb 27 15:59:48 CET 2014


On 2014-02-27 15:54, Sven Nierlein wrote:
> On 2/27/14 15:40, Andreas Ericsson wrote:
>> On 2014-02-25 23:15, Daniel Wittenberg wrote:
>>> I'm curious why we're doing a chdir here, and if so any reason we shouldn't
>>> be checking the return code to make sure it worked?
>>>
>> The real reason is that on centos 5 the default valgrind would
>> previously not coredump child processes with unique pid's, so
>> when I was debugging the command file worker I had to get it to
>> dump core in a separate directory.
>>
>> It's not exactly important for the sake of functionality, but it
>> doesn't hurt either (as we ignore the return values). We could
>> remove it or keep it. I have no opinion either or, really.
> 
> We already removed the chdir in other places because it lead to commands
> with relative paths no longer working. So i would just remove it here too.
> 

That won't be a problem here, since the command file worker never runs
any other programs (it only listens on the command pipe), but I'll get
rid of it even so.

/Andreas



More information about the Naemon-dev mailing list