Home  |  Linux  | Mysql  | PHP  | XML
From:comdog@cvs.perl.org Date:Mon Jun 23 00:56:17 2008
Subject:[svn:perlfaq] r11441 - perlfaq/trunk
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?
 
Navigate in group perl.cvs.perlfaq at sever nntp.perl.org
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by PHP Developer
Powered By PHP Consultants