|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-04-11 08:27 UTC] stefan dot marquardt at hagebau dot de
This are my simple commands:
system("$DLC/bin/proserve $CADB/$DB 2>&1");
system("exec $DLC/bin/_mprshut $CADB/$DB -C watchdog 2>&1");
The first command works fine but the second hangs the actual httpd session.
It executes o.k. but tries to get the actual webserver process:
[root@linux datenbank]# lsof | grep www
httpd 30824 root 16u IPv4 28772 TCP *:www (LISTEN)
httpd 30825 root 16u IPv4 28772 TCP *:www (LISTEN)
httpd 30826 root 16u IPv4 28772 TCP *:www (LISTEN)
httpd 30827 root 16u IPv4 28772 TCP *:www (LISTEN)
httpd 30828 root 16u IPv4 28772 TCP *:www (LISTEN)
httpd 30829 root 16u IPv4 28772 TCP *:www (LISTEN)
httpd 30831 root 16u IPv4 28772 TCP *:www (LISTEN)
httpd 30835 root 16u IPv4 28772 TCP *:www (LISTEN)
_mprshut 31169 root 16u IPv4 28772 TCP *:www (LISTEN)
This process is the parent of 1:
[root@linux datenbank]# ps -ef | grep 31169
root 31169 1 0 13:14 ? 00:00:00 /home/dlc83e/bin/_mprshut /home/
[root@linux datenbank]# ps -ef | grep 30835
root 30835 30824 0 10:59 ? 00:00:00 /usr/local/apache/bin/httpd
Then my actual session of my IE hangs and i only can lose it.
The php script is ended because i got </body> and the IE loading bar vanished.
I can't restart the server because this process 31169 holds port 80 open.
I use the same script on SCO, Reliant Unix and HP-UX11.
On HP-UX11 the _mprshut also listen on port 80 but on a different session because the website still reacts.
The apache server restart is impossible before killing this process manually.
Any ideas where i can search the problem ??
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 20:00:01 2025 UTC |
Hi, system("exec $DLC/bin/_mprshut $CADB/$DB -C watchdog 1>/dev/null 2>&1 &"); has the same effect! _mprshut is a daemon that ended in a second. Please notice: The script doesn't hungs the rest works fine after system. I can't open any new page after accessing this script an _mprshut listen on port 80. On HP-UX the Apache still works fine with a listening _mprshut. StefanTry this: system("exec $DLC/bin/_mprshut $CADB/$DB -C watchdog 2>&1 </dev/null");The same with: system("exec $DLC/bin/_mprshut $CADB/$DB -C watchdog 2>&1 </dev/null"); This _mprshut needs no input. (I mail this problem also to the developer of _mprshut,Progress Database.) The rest of the php script finishes but i can't open a new page and have to close this session. In the moment i have no further idea to separate this command from the actual www session. I tried "at", that works but +1 minute is too late. :-(>> As a workaround, don't use exec :-) system("$DLC/bin/_mprshut $CADB/$DB -C watchdog 2>&1 </dev/null"); has the same effect. :-(>system(" ( $DLC/bin/_mprshut $CADB/$DB -C watchdog >/dev/null 2>&1 </dev/null )&"); >That should run the command in a sub-shell, and might solve this strange problem. >Also, have you tried enabling the sigchild handler? ./configure --help | grep sigchild Nothing helps. The developer of _mprshut can reproduce the same effect under IS(NT).Found new error in latest cvs: This line system("$SDHAG/ha-server $DB $CADB $CABI 1 $SDHAG 2>&1",$ret); has 0 100% as returncode i put an echo before exit 0! With older php there was now error.