All pastes #479814 Raw Edit

Someone

public text v1 · immutable
·published 2007-05-09 22:18 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.Text;
using System.Diagnostics;
using System.IO;

namespace ExitCodeTest
{
    class Program
    {
        static void Main(string[] args)
        {
            System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.StartInfo.FileName = "mono";
            p.StartInfo.Arguments = "/nfs/pfernie/src/cs/ExitCodeTest/Exiter/bin/Debug/Exiter.exe 5";
            p.Start();
            while (!p.HasExited) ;
            System.Threading.Thread.Sleep(5000);
            Console.Out.WriteLine("Early exit code: {0}!", p.ExitCode);
            System.Threading.Thread.Sleep(5000);
            Console.Out.WriteLine("Done: {0}!", p.ExitCode);
        }
    }
}