Exemplo n.º 1
0
        public IProcessTracker Run(IContainerRunInfo runInfo)
        {
            if (runInfo == null)
            {
                throw new ArgumentNullException("runInfo");
            }

            var process = this.prison.Execute(runInfo.FileName, runInfo.Arguments, runInfo.CurrentDirectory, false, runInfo.ExtraEnvironmentVariables, runInfo.StdinPipe, runInfo.StdoutPipe, runInfo.StderrPipe);

            if (runInfo.StdinPipe != null)
            {
                runInfo.StdinPipe.Dispose();
            }
            if (runInfo.StdoutPipe != null)
            {
                runInfo.StdoutPipe.Dispose();
            }
            if (runInfo.StderrPipe != null)
            {
                runInfo.StderrPipe.Dispose();
            }

            return(new ProcessTracker(process));
        }
Exemplo n.º 2
0
        public IProcessTracker Run(IContainerRunInfo runInfo)
        {
            if (runInfo == null)
            {
                throw new ArgumentNullException("runInfo");
            }

            var process = this.prison.Execute(runInfo.FileName, runInfo.Arguments, runInfo.CurrentDirectory, false, runInfo.ExtraEnvironmentVariables, runInfo.StdinPipe, runInfo.StdoutPipe, runInfo.StderrPipe);

            if (runInfo.StdinPipe != null) runInfo.StdinPipe.Dispose();
            if (runInfo.StdoutPipe != null) runInfo.StdoutPipe.Dispose();
            if (runInfo.StderrPipe != null) runInfo.StderrPipe.Dispose();

            return new ProcessTracker(process);
        }