private async Task ProcessChild(ThreadProgress state) { Debug.Assert(state.Newpid != 0, "Child process id not found."); if (state.Newpid != 0) { uint inf = _process.InferiorByPid(state.Newpid); if (inf != 0) { await _process.ConsoleCmdAsync("inferior " + inf.ToString(), allowWhileRunning : false); if (!string.IsNullOrEmpty(_mainBreak)) { await _process.MICommandFactory.BreakDelete(_mainBreak); _mainBreak = null; } state.State = State.AtSignal; await _process.MICommandFactory.Signal("SIGSTOP"); // stop the child } } }