Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > FAQ 8.2 How come exec() doesn't return?

Reply
Thread Tools

FAQ 8.2 How come exec() doesn't return?

 
 
PerlFAQ Server
Guest
Posts: n/a
 
      03-10-2011
This is an excerpt from the latest version perlfaq8.pod, which
comes with the standard Perl distribution. These postings aim to
reduce the number of repeated questions as well as allow the community
to review and update the answers. The latest version of the complete
perlfaq is at http://faq.perl.org .

--------------------------------------------------------------------

8.2: How come exec() doesn't return?

(contributed by brian d foy)

The "exec" function's job is to turn your process into another command
and never to return. If that's not what you want to do, don't use
"exec".

If you want to run an external command and still keep your Perl process
going, look at a piped "open", "fork", or "system".



--------------------------------------------------------------------

The perlfaq-workers, a group of volunteers, maintain the perlfaq. They
are not necessarily experts in every domain where Perl might show up,
so please include as much information as possible and relevant in any
corrections. The perlfaq-workers also don't have access to every
operating system or platform, so please include relevant details for
corrections to examples that do not work on particular platforms.
Working code is greatly appreciated.

If you'd like to help maintain the perlfaq, see the details in
perlfaq.pod.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
FAQ 5.16 How come when I open a file read-write it wipes it out? PerlFAQ Server Perl Misc 0 04-26-2011 04:00 PM
FAQ 8.34 I {changed directory, modified my environment} in a perl script. How come the change disappeared when I exited the script? How do I get my changes to be visible? PerlFAQ Server Perl Misc 0 03-12-2011 11:00 AM
FAQ 8.2 How come exec() doesn't return? PerlFAQ Server Perl Misc 0 02-03-2011 11:00 PM
Come One, Come All Jess Guim Digital Photography 0 12-02-2003 04:43 PM



Advertisments