in reply to Re^3: end "system"
in thread end "system"

Sorry, but even with the 'KILL' parameter, it doesn't close the window. Maybe it only kill the process CMD, not iceweasel itself. It is the same problem with 'system' function.

Replies are listed 'Best First'.
Re^5: end "system"
by BrowserUk (Patriarch) on Oct 26, 2007 at 18:42 UTC

    If you are running on Win32, try it this way:

    my $pid = open CMD, '|-', qq[\"/full/path/to/iceweasel.exe\" -new-wind +ow '$url'] or die $!; close CMD; ... kill 9, $pid; ## Any numeric value other than 2, 15 or 21 should work +here.

    That should start the command directly bypassing cmd.exe and return the pid of the program rather than a shell. It works with opera.exe, but I don't have iceweasel.

    Things to note:

    1. The first part of the third argument to open should be the fully qualified path and name of the command to run.
    2. If the path contains spaces, then you must delimit it using escaped double quotes as shown.
    3. If any of the arguments contain spaces, you may have to delimit them in the same way.
    4. The usual *nix signals 'INT', 'TERM' & 'BREAK' don't work on Win32, but *any* other signal except 0, including those that would not be fatal under *nix, will be.

    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^5: end "system"
by BrowserUk (Patriarch) on Oct 26, 2007 at 16:45 UTC