2025-01-12 04:36:52 +08:00

11 lines
278 B
Plaintext

library(parallel)
p <- parallel:::mcfork()
if (inherits(p, "masterProcess")) {
cat("I'm a child! ", Sys.getpid(), "\n")
parallel:::mcexit(,"I was a child")
}
cat("I'm the master\n")
unserialize(parallel:::readChildren(1.5))
## don't do anything here as stdin is eaten.