[Rd] Detect a terminated pipe

Kirill Müller kirill.mueller at ivt.baug.ethz.ch
Fri Mar 14 13:09:10 CET 2014


Is there a way to detect that the process that corresponds to a pipe has 
ended? On my system (Ubuntu 13.04), I see

 > p <- pipe("true", "w"); Sys.sleep(1); system("ps -elf | grep true | 
grep -v grep"); isOpen(p)
[1] TRUE

The "true" process has long ended (as the filtered ps system call emits 
no output), still R believes that the pipe p is open.

Thanks for your input.

Best regards


More information about the R-devel mailing list