Re: Is there a way to spawn a program from perl that is independent?
- From: "comp.lang.c++" <ced@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 4 Aug 2008 12:14:10 -0700 (PDT)
On Aug 4, 5:44 am, "Peter J. Holzer" <hjp-usen...@xxxxxx> wrote:
On 2008-08-04 04:16, comp.lang.c++ <c...@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
In Unix, you could background the other script in
a subshell:
0 == system "(/path/to/other_script &)"
or die "system failed: $?";
But getting the return status of the backgrounded
task would be messy
If you use open with mode '-|' or '|-' it isn't messy at all: close
returns the return status. It also avoids the additional shell. You need
to take care about the input or output, which may add some
complications.
True. I was just guessing from the OP's description "throw off
another
script and go on with its business", he just wanted a "spawn and
forget"
type background action. (with no interaction and possibly no concern
about status as well),
--
Charles DeRykus
Charles DeRykus
.
- References:
- Is there a way to spawn a program from perl that is independent?
- From: Tom Wyley
- Re: Is there a way to spawn a program from perl that is independent?
- From: comp.lang.c++
- Re: Is there a way to spawn a program from perl that is independent?
- From: Peter J. Holzer
- Is there a way to spawn a program from perl that is independent?
- Prev by Date: FAQ 4.74 How do I print out or copy a recursive data structure?
- Next by Date: Re: FAQ 4.2 Why is int() broken?
- Previous by thread: Re: Is there a way to spawn a program from perl that is independent?
- Next by thread: FAQ 4.26 How do I reformat a paragraph?
- Index(es):