D D Allen wrote:

> 
> I noticed that your solution uses the construct "system( 1, 'start
> command' )".   A month or so ago, I saw this construct used in a posting
> to this list and added it to a Perl/Tk script to launch a web page in
> the default browser.  Control is immediately returned to the calling
> perl/Tk script and the browser opens independent of the calling script.
>   In took a bit of fiddling but it works great (notice the quotes around
> the url part after the "http://";).
> 
>         my $url = 'http://"dummy.com/searchByName.wss?uid=' . $sn .
> '&task=viewrecord"';
>         system(1, "start $url");
> 
> At the time, I had never seen this construct before and tried to find
> were it was documented.  It's not documented in "perlfunc" under either
> the system or the exec call (that I can recognize -- which might not be
> saying much).   And I looked at the ActivePerl documentation related to
> Windows programming and couldn't find an explanation of what "system( 1,
> "start command") does -- as opposed to plain old "system( "start
> command")".
> 
> Is this undocumented functionality of the system call available on Win32
> or is there documentation somewhere that explains what it does?

Not much:

perlport man page:

    system LIST

            ...

            As an optimization, may not call the command shell specified in
            $ENV{PERL5SHELL}. "system(1, @args)" spawns an external process and
            immediately returns its process designator, without waiting for it
            to terminate. Return value may be used subsequently in "wait" or
            "waitpid". Failure to spawn() a subprocess is indicated by setting
            $? to "255 << 8". $? is set in a way compatible with Unix (i.e. the
            exitstatus of the subprocess is obtained by "$? >> 8", as described
            in the documentation). (Win32)

perl56delta/perl561delta man pages:

    Win32

    ...

    system(1,...) now returns true process IDs rather than process handles.
    kill() accepts any real process id, rather than strictly return values from
    system(1,...).
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to