[FFmpeg-devel] [PATCH] Make ffserver child don't chdir just after fork
Sat Jun 21 23:46:16 CEST 2008
M?ns Rullg?rd wrote:
> Baptiste Coudurier <baptiste.coudurier at smartjog.com> writes:
>> Stefano Sabatini wrote:
>>> Hi all,
>>> currently when ffserver runs in daemon mode forks, then the parent
>>> exits immediately while the child chdir()s to "/", which is also the dir
>>> when it opens its log file, which isn't what the user expects (in most
>>> cases it will simply fail to open the file because it doesn't have
>>> write permission on that dir).
>>> A possible solution to the problem could be simply not to chdir, but
>>> I'm not very familiar with the ffserver.c code so this could be a
>>> wrong fix (and maybe we should anyway check for the result of the open
>>> operation on the log file).
>> Humm, yes, patch ok. I don't know why it would chdir to "/".
> It's pretty standard procedure for daemons to chdir to /.
Humm, ok, do you think it should stay this way then ?
Baptiste COUDURIER GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc. http://www.smartjog.com
Key fingerprint 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
More information about the ffmpeg-devel