From: Paul Johnson <[EMAIL PROTECTED]>
> On Fri, Apr 16, 2004 at 04:42:13PM +0200, Jenda Krynicky wrote:
> > From: Gary Stainburn <[EMAIL PROTECTED]>
> > > On Friday 16 Apr 2004 3:00 pm, Jenda Krynicky wrote:
> > > >
> > > > And if you want system() start the program and return
> > > > immediately you just use it like this:
> > > >
> > > >         system( 1, 'the_program and parameters');
> > > > or
> > > >         system( 1, 'the_program', @parameters);
> > > 
> > > Hi Jenda,
> > > 
> > > this struck me as odd, so I looked at 'perldoc -f system' and
> > > nowhere does it mention returning immediately, nor does it mention
> > > putting anything before the program name.
> > 
> > Yeah this is an "undocumented feature". Don't really understand why,
> > because unlike the Unixish  system( 'program params &') this is
> > actually portable.
> > 
> > The only place I found this documented are the perlport and 
> > perl56delta and perl561delta manpages. But it is being used in
> > IPC::Open3, Shell.pm, IO::Pipe and PPM::Installer::Local.pm.
> 
> I think that no one is very keen to document it because it seems such
> a hack, and it would be much nicer to just quietly remove it and
> replace it with something better.  Of course, the longer it stays the
> less likely this seems.

I don't think you can safely remove it. Even if it was only 
documented in perlport.

I agree though that it looks a bit hackish. There might be a nicer 
interface, since 
        system( 1, 'notepad', 'foo.txt');
doesn't look too selfdescribing.

Maybe something like
        system( {background => 1}, 'notepad', 'foo.txt');
which would allow for other process creation options.

Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to