Launching a file properly
| From: | Chris Aitken | Date: | Fri, 13 Oct 2000 07:00:11 +0000 |
| Subject: | Launching a file properly | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19944@lists.php.net to get a copy of this message | ||
I have a bit of a problem.
I am needing to launch a program from a php script. This I can do with the following code
$fp = popen("/usr/local/bin/minicom -stuff", "w+");
pclose($fp);
Now Minicom launches properly, contacts the serial port and does everything properly, but then gets caught up in a major loop. If I run top, it shows minicom just chewing up the CPU until I kill it off.
Am I missing something, or doing something wrong.
If I run the command from the command line, it runs perfectly, does its deed and exits minicom (its all in my minicom script), but doing it from the above code still allows it to do its deed, but wont kill off minicom once its finished and it just loops into oblivion.
Any assistance would be muchly appreciated.
Thanks
Chris