Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
if ($pid = fork)
{
# parent
do
{
print "\b-"; sleep 1;
print "\b\\"; sleep 1;
print "\b|"; sleep 1;
print "\b/"; sleep 1;
$child_pid = waitpid(-1,0);
} until $child_pid == -1;
}
else
{
# child
exec("cmd");
exit(0);
}
waitpid($pid, 0);
well, the "do"-loop doesn't actually loop - how can i get it
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: fork...
by perlmonkey (Hermit) on Apr 28, 2000 at 06:41 UTC | |
|
Re: fork...
by nostromo (Sexton) on Apr 28, 2000 at 13:00 UTC | |
by perlmonkey (Hermit) on Apr 28, 2000 at 20:36 UTC | |
|
Re: fork...
by Anonymous Monk on Apr 29, 2000 at 00:49 UTC | |
by perlmonkey (Hermit) on Apr 29, 2000 at 01:32 UTC |