in reply to Re^3: Ulimit makes program hang
in thread Ulimit makes program hang
This program never hangs -- always says cannot fork: Resource temporarily unavailable at ./fork_wait line 7.#!/usr/bin/perl -w my $x = $ARGV[0] + 1; print STDERR "$x\n"; if (!defined($child_pid = fork())) { die "cannot fork: $!"; } elsif ($child_pid) { waitpid($child_pid, 0); } else { exec "$0 $x"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Ulimit makes program hang
by Bloodnok (Vicar) on Aug 13, 2008 at 16:50 UTC |