home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cse.unsw.edu.au
/
2014.06.ftp.cse.unsw.edu.au.tar
/
ftp.cse.unsw.edu.au
/
pub
/
doc
/
languages
/
perl
/
nutshell
/
ch5
/
forkdaemon.eg
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
Text File
|
1992-10-18
|
257 b
|
13 lines
unless (fork) { # this is the child
unless (fork) { # this is the child's child
sleep 1 until getppid == 1;
for (1..1000) {
system "foo $_";
}
exit 0;
}
# first child exits quickly
exit 0;
}
wait; # parent reaps first child quickly