[FFmpeg-devel] [PATCH] Make ffserver daemon chdir just after log init

Baptiste Coudurier baptiste.coudurier
Mon Jun 23 20:06:06 CEST 2008


Hi Reimar,

Reimar D?ffinger wrote:
> Hello,
> On Mon, Jun 23, 2008 at 09:28:59AM +0200, Stefano Sabatini wrote:
>> On date Monday 2008-06-23 02:09:43 +0100, M?ns Rullg?rd encoded:
>>> Ramiro Polla <ramiro at lisha.ufsc.br> writes:
>>>
>>>> Baptiste Coudurier wrote:
>>>>> I don't know why it would chdir to "/".
>>>> Suppose you want to delete the directory from where the daemon was 
>>>> started,
>>> That's only a problem on lesser operating systems.  ;-)
>>>
>>>> or unmount its disk...
>>> Yes, this is a valid reason.
>> here it is another fix, this time the problem of the missing logfile
>> is solved chdir()ing just after the log file has been just opened, so
>> the log file will be placed in the dir when ffserver is launched as
>> expected, then the daemon process will chdir() to "/" as it seems
>> usual and safer for daemons.

Patch ok.

> Just for the record I'd like to add that for a daemon I find it quite
> incorrect to create the log file in the current directory instead of in
> some fixed place.

Humm this is not the case I think.

Log is by default disabled, if debug mode is on logfile is stderr, and
if CustomLog is set, in path specified.

[...]

-- 
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
Smartjog USA Inc.                                http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA




More information about the ffmpeg-devel mailing list