----- Original Message ----- 
From: "Daniel Beckham" <[EMAIL PROTECTED]>
To: "Jason Greene" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, September 14, 2001 1:49 PM
Subject: Re: PHP pcntl function documentation (and other stuff)


> 
> ----- Original Message -----
> From: "Jason Greene" <[EMAIL PROTECTED]>
> To: "Daniel Beckham" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> 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.

Well imagine someone calling exec(3) in a webserver SAPI  hehe not good : )
True exec behavior is destructive which is why I agree that pcntl is a good place.

> 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.

Yes it really is quite confusing and a little bit of a mess, but we are still stuck 
with it for backwards compatibility reasons.

> > 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
 I took a look at them... Good Job!!  As soon as I get my doc karma I can 
help out. Until then I can add the pcntl_exec function you requested, and 
I am debating on adding a pcntl_vfork....


-Jason
 


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to