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

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

Thread Previous | Thread Next
Ben Morrow
May 11, 2010 22:30
Re: [perl #75052] docs perlfunc system() and SIGINT
Message ID:
Quoth (David Golden):
> On Tue, May 11, 2010 at 6:15 PM, Kevin Ryde <> 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'.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About