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