Perl 'system' Creates Program That Dies When First C Program Dies

Perl 'system' Creates Program That Dies When First C Program Dies

Post by clusardi2 » Sun, 19 Oct 2003 22:36:53


Hello,

What are some simple ways to run a perl script from an initial c program
which starts another C program that stays around after the first program goes
away? Perl starts the second C program.

I've tried using "system ('executable'), but when the first program is
stopped the second stops without my intervention. What I want to be able to do
is run my first program that starts the perl script which starts another
program that stays around after the first program ends its execution.


Thank you,
Christopher Lusardi
 
 
 

Perl 'system' Creates Program That Dies When First C Program Dies

Post by Bob Walto » Mon, 20 Oct 2003 02:18:34


Your question isn't really a Perl question, but rather an OS question --
the answer will be the same if it were another language that is kicking
off your executables -- hence it is off-topic here. And the answer will
depend on your OS. What is it?

--
Bob Walton
Email: http://www.yqcomputer.com/

 
 
 

Perl 'system' Creates Program That Dies When First C Program Dies

Post by clusardi2 » Mon, 20 Oct 2003 19:40:29

My operating system is Red Hat Linux.
 
 
 

Perl 'system' Creates Program That Dies When First C Program Dies

Post by Alan J. Fl » Mon, 20 Oct 2003 20:53:53

On Sun, 19 Oct 2003, Christopher M. Lusardi blurted out:


Your posting style is TOFU.
 
 
 

Perl 'system' Creates Program That Dies When First C Program Dies

Post by Rob Woodar » Sat, 25 Oct 2003 03:13:31


#!/usr/bin/perl -w
system ('executable');
while (1) {
print "infinite loops are fun!\n";
}

That is OS-independent I believe... :)