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

Grégory Marfjan (spam-protected)
Wed Mar 23 18:44:39 CET 2005


		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






More information about the Olsr-dev mailing list