| Subject: | [svn:perlfaq] r11441 - perlfaq/trunk |
|---|---|
| From: | comdog@xxxxxxxxxxxx |
| Date: | Sun, 22 Jun 2008 23:56:17 -0700 (PDT) |
| Newsgroups: | perl.cvs.perlfaq |
Author: comdog
Date: Sun Jun 22 23:56:16 2008
New Revision: 11441
Modified:
perlfaq/trunk/perlfaq8.pod
Log:
* perlfaq8: How come exec() doesn't return?
+ expanded answer to list other alternatives
Modified: perlfaq/trunk/perlfaq8.pod
==============================================================================
--- perlfaq/trunk/perlfaq8.pod (original)
+++ perlfaq/trunk/perlfaq8.pod Sun Jun 22 23:56:16 2008
@@ -20,11 +20,16 @@
binary was built for.
=head2 How come exec() doesn't return?
+X<exec> X<system> X<fork> X<open> X<pipe>
-Because that's what it does: it replaces your currently running
-program with a different one. If you want to keep going (as is
-probably the case if you're asking this question) use system()
-instead.
+(contributed by brian d foy)
+
+he C,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 C<exec>. :)
+
+If you want to run an external command and still keep your Perl process
+going, look at a piped C<open>, C<fork>, or C<system>.
=head2 How do I do fancy stuff with the keyboard/screen/mouse?
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [svn:perlfaq] r11440 - perlfaq/trunk, comdog |
|---|---|
| Next by Date: | [svn:perlfaq] r11445 - perlfaq/trunk, comdog |
| Previous by Thread: | [svn:perlfaq] r11440 - perlfaq/trunk, comdog |
| Next by Thread: | [svn:perlfaq] r11445 - perlfaq/trunk, comdog |
| Indexes: | [Date] [Thread] [Top] [All Lists] |