Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Re: Ignoring Child Processes And glob()

by barndoor (Pilgrim)
on Jul 28, 2000 at 15:37 UTC ( #24830=note: print w/replies, xml ) Need Help??

in reply to Ingoring Child Processes And glob()

Here some more of the script to give you an idea of what I'm doing:
#!/usr/local/bin/perl -w use strict; sub executeStream($); $SIG{CHLD} = 'IGNORE'; # The glob below will work but the message detailed in my original pos +t will occur. my @fileList = glob("/mypath/*.log"); foreach my $logfile (@fileList) { print "Got logfile $logfile\n"; } executeStream(1); sub executeStream($) { my $childProcess; unless (defined($childProcess = fork())) { die "Could not fork new child process."; } unless($childProcess) { # Child process so lets exec the loader. exec("myprog " . $_[0]) or die "Could not exec"; } }

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://24830]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2020-04-09 11:09 GMT
Find Nodes?
    Voting Booth?
    The most amusing oxymoron is:

    Results (47 votes). Check out past polls.