@@ -40,7 +40,7 @@ print(handle)
4040And here is what the child process has sent so far to its output streams:
4141
4242``` r
43- process_read(handle , timeout = 1000 )
43+ process_read(handle , PIPE_STDOUT , timeout = TIMEOUT_INFINITE )
4444# > [1] "Welcome to Ubuntu 16.10 (GNU/Linux 4.8.0-27-generic x86_64)"
4545# > [2] ""
4646# > [3] " * Documentation: https://help.ubuntu.com"
@@ -60,7 +60,7 @@ to list files.
6060``` r
6161process_write(handle , ' ls\n ' )
6262# > [1] 3
63- process_read(handle , timeout = 1000 )
63+ process_read(handle , PIPE_STDOUT , timeout = TIMEOUT_INFINITE )
6464# > [1] "Desktop" "Download" "examples.desktop"
6565# > [4] "Music" "Public" "Video"
6666process_read(handle , PIPE_STDERR )
@@ -78,7 +78,7 @@ We are now ready to close the connection by exiting the remote shell:
7878``` r
7979process_write(handle , ' exit\n ' )
8080# > [1] 5
81- process_read(handle , timeout = TIMEOUT_INFINITE )
81+ process_read(handle , PIPE_STDOUT , timeout = TIMEOUT_INFINITE )
8282# > character(0)
8383process_read(handle , PIPE_STDERR )
8484# > character(0)
@@ -87,7 +87,7 @@ process_read(handle, PIPE_STDERR)
8787The last thing is making sure that the child process is no longer alive:
8888
8989``` r
90- process_wait(handle )
90+ process_wait(handle , TIMEOUT_INFINITE )
9191# > [1] 0
9292process_status(handle )
9393# > [1] "exited"
0 commit comments