Professional Web Applications Themes

how to start a command asyncronous in the backgroun on W2K - PERL Beginners

I am writing a script to ask for some variables , construct the command then launch the command with qx or backtick . The command works fine . My problem is that the command monopolizes a console session ( I can kill it and my fired command still works ) . what i need is to fir the command in the background and exit the perl shell . any suggestions ur help is greatly appreciated...

  1. #1

    Default how to start a command asyncronous in the backgroun on W2K

    I am writing a script to ask for some variables , construct the command
    then launch the command with qx or backtick . The command works fine .
    My problem is that the command monopolizes a console session ( I can
    kill it and my fired command still works ) .
    what i need is to fir the command in the background and exit the perl
    shell .
    any suggestions
    ur help is greatly appreciated
    Aroushdi Guest

  2. #2

    Default Re: how to start a command asyncronous in the backgroun on W2K

    On Fri, Apr 16, 2004 at 04:42:13PM +0200, Jenda Krynicky wrote: 
    > >
    > > 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.[/ref]
    >
    > Yeah this is an "undoented feature". Don't really understand why,
    > because unlike the Unixish
    > system( 'program params &')
    > this is actually portable.
    >
    > The only place I found this doented 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.[/ref]

    I think that no one is very keen to doent 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.

    --
    Paul Johnson - net
    http://www.pjcj.net
    Paul Guest

  3. #3

    Default Re: how to start a command asyncronous in the backgroun on W2K

    From: Paul Johnson <net> 
    > >
    > > Yeah this is an "undoented feature". Don't really understand why,
    > > because unlike the Unixish system( 'program params &') this is
    > > actually portable.
    > >
    > > The only place I found this doented 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.[/ref]
    >
    > I think that no one is very keen to doent 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.[/ref]

    I don't think you can safely remove it. Even if it was only
    doented 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
    ===== cz === 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

    Jenda Guest

Similar Threads

  1. start Flash Player from command line
    By pvl_h2002Denis in forum Adobe Flash, Flex & Director
    Replies: 0
    Last Post: July 24th, 10:20 AM
  2. transparent PNG displays discolored block in colored backgroun
    By mtaylor webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 0
    Last Post: October 10th, 02:28 PM
  3. what command to start and stop services ?
    By Villy Kruse in forum AIX
    Replies: 1
    Last Post: August 11th, 10:39 AM
  4. Catch Exceptions for Asyncronous Invoke
    By Guogang in forum ASP.NET Web Services
    Replies: 1
    Last Post: July 24th, 10:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139