Skip to content

Commit d1f99b8

Browse files
committed
frollapply: wait for terminated parallel processes
While handling an interrupt, ask mccollect() to wait for the child process to exit (with a warning) in order to avoid producing zombies. Otherwise a process that is too slow to react to SIGTERM will remain a zombie until the parent process exits.
1 parent 7ce5373 commit d1f99b8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

R/frollapply.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ frollapply = function(X, N, FUN, ..., by.column=TRUE, fill=NA, align=c("right","
412412
# nocov start
413413
suspendInterrupts({
414414
lapply(jobs, function(pid) try(tools::pskill(pid), silent = TRUE))
415-
parallel::mccollect(jobs, wait = FALSE)
415+
parallel::mccollect(jobs)
416416
})
417417
# nocov end
418418
# Let the interrupt continue without invoking restarts

0 commit comments

Comments
 (0)