[olsr-dev] debug_level=0 & standart I/O

Andreas Tønnesen (spam-protected)
Mon Mar 28 11:43:05 CEST 2005


Hi Grégory,

Wouldn't the right thing here be for the parent process to close the
handlers? Or does that not work?
I'll add Thomas' suggested code when I get back from vacation(tomorrow),
so there will be a fix for this in 0.4.9.

- Andreas

>
> 		Hi,
>
> 	I'm using PHP on a web server for making a page that start/stop olsrd.
> When PHP execute "olsrd -i eth0 -d 0" command (for example), it waiting
> for the end of command... and it never happens because while the
> standard I/O (stdin/stdout/stderr) are not closed, php think that the
> process is running...
>
> 	If I modified the main.c by writing "fclose(stdin); fclose(stdout);
> fclose(stderr)" before the setsid command (in the child code), it run
> ok....
>
> 	So, is it a good idea to close the standard I/O after the fork (for the
> child, the parent exit normaly) or is there an other solution ?
>
> Best regards,
>
> --
> Grégory Marfjan
>
>
>
> _______________________________________________
> olsr-dev mailing list
> (spam-protected)
> https://www.olsr.org/mailman/listinfo/olsr-dev
>


---------
Andreas Tønnesen
http://www.olsr.org



More information about the Olsr-dev mailing list