11 lines
278 B
Plaintext
Raw Normal View History

2025-01-12 00:52:51 +08:00
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.