public static UnixChildProcessState Create(UnixChildProcessStateHelper helper, bool allowSignal) { var token = IssueProcessToken(); var state = new UnixChildProcessState(helper, token, allowSignal); lock (ChildProcessState) { ChildProcessState.Add(token, state); } return(state);
/// <summary> /// Creates a <see cref="UnixChildProcessState"/> with a new process token (an identifier unique within the current AssemblyLoadContext). /// </summary> /// <returns>A <see cref="UnixChildProcessStateHolder"/> that wraps the created <see cref="UnixChildProcessState"/>.</returns> public static UnixChildProcessStateHolder Create(UnixChildProcessStateHelper helper, bool allowSignal) { var state = ChildProcessStateCollection.Create(helper, allowSignal); return(new UnixChildProcessStateHolder(state)); }
private UnixChildProcessState(UnixChildProcessStateHelper helper, long token, bool allowSignal) { _helper = helper; _token = token; _allowSignal = allowSignal; }