search for: pipeconnectionobject

Displaying 2 results from an estimated 2 matches for "pipeconnectionobject".

2015 May 14
2
Reading exit code of pipe()
The difference in the return value of close(pipeConnectionObject) seems to depend on whether the pipe connection was opened via the pipe() or open() functions (close() returns NULL) > con <- pipe("ls") > open(con, "r") > readLines(con, n=1) [1] "1032.R" > print(close(con)) NULL > con <- pipe...
2015 May 14
3
Reading exit code of pipe()
Is there a way to get the status code of a pipe() command? The documentation suggests that it might be returned by close, however this does not seem to be the case. con <- pipe("cat /etc/passwd", "r") stream <- readLines(con, n = 10) err <- close(con) print(err)