mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
SOURCE DUMP v1
This commit is contained in:
parent
bd62d51ec9
commit
fb20299e9d
1 changed files with 768360 additions and 0 deletions
20
brutal.monitor/Brutal.Monitor.Common/ProcessExtension.cs
Normal file
20
brutal.monitor/Brutal.Monitor.Common/ProcessExtension.cs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
using System.Diagnostics;
|
||||
|
||||
namespace Brutal.Monitor.Common
|
||||
{
|
||||
internal static class ProcessExtension
|
||||
{
|
||||
public static void WriteLineSync(this Process process, string line)
|
||||
{
|
||||
// Called from crash handlers, so a dead child's broken pipe must never throw
|
||||
try
|
||||
{
|
||||
lock (process.StandardInput)
|
||||
process.StandardInput.WriteLine(line);
|
||||
}
|
||||
catch (IOException) { }
|
||||
catch (ObjectDisposedException) { }
|
||||
catch (InvalidOperationException) { }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue