[FFmpeg-devel] [PATCH] Make ffserver daemon chdir just after log init
Mon Jun 23 21:46:05 CEST 2008
On date Monday 2008-06-23 11:06:06 -0700, Baptiste Coudurier encoded:
> 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.
Yes, and nothing forbids you from setting an absolute path for the
FFmpeg = Frightening Furious Minimal Patchable Elastic Guide
More information about the ffmpeg-devel