예제 #1
0
            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);
예제 #2
0
        /// <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));
        }
예제 #3
0
 private UnixChildProcessState(UnixChildProcessStateHelper helper, long token, bool allowSignal)
 {
     _helper      = helper;
     _token       = token;
     _allowSignal = allowSignal;
 }