Re: Forking external binaries

From: Date: Wed, 21 Apr 2004 08:47:38 +0000
Subject: Re: Forking external binaries
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-184106@lists.php.net to get a copy of this message
There's a "nu-fork" library or something around. There's a pear package which provides an API to this. Have a look around. "Michal Migurski" <mike@teczno.com> wrote in message news:Pine.BSF.4.58.0404201725450.37146@or.pair.com... > > We have a web application that forks off an external program to inject > > an email in the outgoing queue. At busy periods this external program > > (qmail-inject) can take a little while to return. I'm currently using > > popen() to spawn the qmail-inject binary. > > > > Is there a way to spawn the external binary but not wait for it to > > return. I'd be happy to ignore any return value if the tradeoff was a > > fast return. > > If you call it via exec(), you can append an ampersan to detach the > controlling terminal: > > exec("/path/to/qmail-inject -args &"); > > Wish php had fork() in a non-experimental context. :\ > > --------------------------------------------------------------------- > michal migurski- contact info and pgp key: > sf/ca http://mike.teczno.com/contact.html

« previous php.general (#184106) next »