Пример #1
0
            protected override void Dispose(bool disposing)
            {
                if (_disposed)
                {
                    return;
                }

                _disposed = true;

                Disconnected -= PythonRpc_Disconnected;

                base.Dispose(disposing);
                if (_process?.HasExited == false)
                {
                    _procServices.Kill(_process);
                    _process = null;
                }
            }
Пример #2
0
 public void Kill()
 {
     // This is needed because broker user cannot kill process running as another user.
     _ps.Kill(_process.Id);
 }