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

Reimar Döffinger Reimar.Doeffinger
Mon Jun 23 18:28:32 CEST 2008


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.

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.




More information about the ffmpeg-devel mailing list