openpid.t revision 7c478bd95313f5f23a4c958a745db2134aa03244
#!./perl
#####################################################################
#
# Test for process id return value from open
# Ronald Schmidt (The Software Path) RonaldWS@software-path.com
#
#####################################################################
BEGIN {
chdir 't' if -d 't';
}
}
use Config;
$| = 1;
#
# commands run 4 perl programs. Two of these programs write a
# short message to STDOUT and exit. Two of these programs
# read from STDIN. One reader never exits and must be killed.
# the other reader reads one line, waits a few seconds and then
# exits to test the waitpid function.
#
#warn "#$cmd1\n#$cmd2\n#$cmd3\n#$cmd4\n";
# start the processes
my $killsig = 'HUP';
# get message from first process and kill it
print "# errno == $!\n";
# get message from second process and kill second process and reader process
print "# errno == $!\n";
# send one expected line of text to child process and then wait for it
next_test();
print "# waiting for process $pid4 to exit\n";