develooper Front page | perl.perl5.porters | Postings from May 2010

Re: [perl #75052] docs perlfunc system() and SIGINT

Thread Previous | Thread Next
From:
Ben Morrow
Date:
May 11, 2010 22:30
Subject:
Re: [perl #75052] docs perlfunc system() and SIGINT
Message ID:
20100512053012.GA26105@osiris.mauzo.dyndns.org
Quoth xdaveg@gmail.com (David Golden):
> On Tue, May 11, 2010 at 6:15 PM, Kevin Ryde <perlbug-followup@perl.org> wrote:
> >    Run a program or a shell command and return its exit status.
> >    C<SIGINT> and C<SIGQUIT> act on the child but are ignored by the
> >    Perl parent.  The parameters are the same as for C<exec LIST>.
> >    Note that argument processing varies depending on the number of
> >    arguments ...
> 
> There are some subtle portability issues in that statement, since
> Win32 emulates the signals and a CTRL-C sends a signal that reaches
> all processes attached to the console, including the parent.

The whole of the first paragraph of perldoc -f system is unportable.
Non-Unix systems don't use fork/exec at all, and many Unixes use vfork,
for instance. 

I feel a better approach to system/exec would be to document system
first ('runs an external command as a separate process'), and then
document exec as 'like system, but replaces the current process instead
of creating a new one'.

Ben


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About