-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for process restart #26
Comments
Hi @Wintereise . While I suppose you can technically "re-start" a .NET process object by calling MedallionShell takes the approach that processes are one-time events (Commands), e. g. associating each process with a Therefore, I think the best way to represent a process that may die with or without MedallionShell is to create an entirely new For example, if you want a process that auto-restarts on unexpected failure you could do something like this:
In this case, we're taking advantage of a MedallionShell feature which makes sure all output has been written from redirection before allowing the If we want the ability to kill this loop ourselves, we can easily pass in a |
Hi @madelson Thank you for the insight, understood. I'll close this. |
Hi,
Is there any graceful way to restart a process that has for example been interrupted with
Command.Kill
(or by outside circumstances)?Currently we're setting
DisposeOnExit
to false, and callingCommand.Process.Start
again. This works, but stdout/stderror redirection no longer works.My question is, is there a better way, or is there a way to re-attach the output buffering internals if our
Process.Start()
hack is the recommended way forward?The text was updated successfully, but these errors were encountered: