Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd "Redirect both stdout and stderr of child process to the same fle" #349
Conversation
This comment has been minimized.
This comment has been minimized.
budziq
requested changes
Oct 30, 2017
|
Nice! Just some minor suggestions below. |
|
|
||
| [![std-badge]][std] [![cat-os-badge]][cat-os] | ||
|
|
||
| Spawns a Unix command and redirects `stdout` and `stderr` to the same |
This comment has been minimized.
This comment has been minimized.
budziq
Oct 30, 2017
Collaborator
The api itself is cross platform so I would avoid mentioning unix here. Would rather go with child processes.
| used to reference the same file for `stdout` and `stderr`. | ||
|
|
||
| The below recipe is equivalent to run `ls . oops &> out.txt`. | ||
|
|
This comment has been minimized.
This comment has been minimized.
budziq
Oct 30, 2017
Collaborator
Here we can mention that the example would be equivalent to following Unix shell command.
| Spawns a Unix command and redirects `stdout` and `stderr` to the same | ||
| file. It follows the same idea as [run piped external | ||
| commands](#ex-run-piped-external-commands), however [`process::Stdio`] | ||
| will be constructed from a file. In addition, [`File::try_clone`] is |
This comment has been minimized.
This comment has been minimized.
budziq
Oct 30, 2017
Collaborator
the statement might be slightly misleading. we might want to rewrite to emphasize that process::Stdio will write to provided Fileand that File::try_clone will duplicate the file handle ensuring the write pointer is synchronized for stderr and stdout
ludwigpacifici
force-pushed the
ludwigpacifici:master
branch
from
9f8377c
to
22e04eb
Oct 31, 2017
ludwigpacifici
force-pushed the
ludwigpacifici:master
branch
from
22e04eb
to
479031c
Oct 31, 2017
This comment has been minimized.
This comment has been minimized.
|
@budziq, PR updated with your comments. I also changed changed the equivalent Unix command from |
budziq
merged commit 0ecf0bf
into
rust-lang-nursery:master
Oct 31, 2017
This comment has been minimized.
This comment has been minimized.
|
Well done! |
This comment has been minimized.
This comment has been minimized.
|
Thanks! |
ludwigpacifici commentedOct 28, 2017
fixes #345