Revision: 1066
http://svn.sourceforge.net/r-gregmisc/?rev=1066&view=rev
Author: warnes
Date: 2007-03-06 14:47:29 -0800 (Tue, 06 Mar 2007)
Log Message:
-----------
Create SysV and BSD tests for code to prevent zombie process creation, update code that intentionally creates zombies. Move sub-process creation and zombie test code to a function for use by all three test files
Added Paths:
-----------
trunk/fork/tests/test_many_fork_BSD.R
Added: trunk/fork/tests/test_many_fork_BSD.R
===================================================================
--- trunk/fork/tests/test_many_fork_BSD.R (rev 0)
+++ trunk/fork/tests/test_many_fork_BSD.R 2007-03-06 22:47:29 UTC (rev 1066)
@@ -0,0 +1,22 @@
+## This script starts child processes, and sets up a 'dummy' SIGCLD
+## hander to handle child process notifications. Hopefully on both BSD
+## and Sys5 derived systems, this should cause child processes to exit
+## and die cleanly, IE without becoming zombies.
+
+library(fork)
+
+## start signal handler
+handleSIGCLD()
+
+source("checkZombies.R")
+
+nZombies <- checkZombies()
+
+if(nZombies) {
+ stop("Zombie processes created")
+} else {
+ cat("Success!\n")
+}
+
+# remove signal handler
+restoreSIGCLD()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|