Since we're banning System.Diagnostics.Process and providing an API-incompatible replacement, it means people will not be able to use libraries like MedallionShell.
We should provide a similarly rich API to make up for that fact.
Here are some of the main things I think I'd like to change:
[x] When a process output stream is redirected, we should buffer up all the output so it can be read at any point. This is going to be a reasonable default for the vast majority of cases.
[x] ~There should be a way to redirect process output to the moral equivalent of /dev/null.~
[x] ~Provide convenient piping syntax with overloaded |, >, and < operators.~
[x] TerminalProcess.SendSignal should throw an exception if the given signal cannot be synthesized (e.g. CTRL_CLOSE_EVENT on Windows).
[x] Drop support for process diagnostic inspection properties. Most of this stuff is poorly implemented outside of Windows and rarely used.
[x] Translate non-zero exit codes to an exception (with an option to turn this off).
[x] Rename TerminalProcess to ChildProcess and move it to System.Processes namespace.
Since we're banning
System.Diagnostics.Process
and providing an API-incompatible replacement, it means people will not be able to use libraries like MedallionShell.We should provide a similarly rich API to make up for that fact.
Here are some of the main things I think I'd like to change:
/dev/null
.~|
,>
, and<
operators.~TerminalProcess.SendSignal
should throw an exception if the given signal cannot be synthesized (e.g.CTRL_CLOSE_EVENT
on Windows).TerminalProcess
toChildProcess
and move it toSystem.Processes
namespace.