Re: PHP pcntl function documentation (and other stuff)

From: Date: Fri, 14 Sep 2001 18:49:52 +0000
Subject: Re: PHP pcntl function documentation (and other stuff)
References: 1 2 3 4  Groups: php.dev 
Request: Send a blank email to php-dev+get-65952@lists.php.net to get a copy of this message
----- Original Message ----- From: "Jason Greene" <jason@inetgurus.net> To: "Daniel Beckham" <danbeck@dealnews.com> Cc: <php-dev@lists.php.net> Sent: Friday, September 14, 2001 11:35 AM Subject: Re: PHP pcntl function documentation (and other stuff) > > > The system and exec (IMHO) are written very badly in PHP > > and don't even come close to doing what execv will do. They are pretty much > > the same as using backticks but with a few variations. (Getting the exit > > code and the last line of output sent by the program.) They just aren't > > suited to the stuff that's done with fork and execv. > > Well they are very good at their purpose, which is to take care of > all the intricacies of spawning another process. > I think that I probably used harsher language then I really meant to when talking about exec and system. My main beef is that exec (and a few other PHP functions) use similar names as their (choose your language) counterparts, but don't make a very good attempt at actually emulating those counterparts. I personally think that exec would always have been better off emulating the exec (3) functions instead. But of course, fork() has been begged for, for eons. The fact that PHP is open source is a blessing and a curse. The blessing is that If you don't like how someone wrote a function like system() or exec() you can just roll your own. The curse is that there end up being three ways to do something and they could probably all be rolled into one for brevity and clarity. > Sounds great. I will try and focus as much time as I can on getting docs before > the release. Great.. I already have the pcntl_fork and pcntl_waitpid docs done... I'll probably also do the waitpid macros before I send you something. Daniel

« previous php.dev (#65952) next »