?
Solved

Control the behaviour of spawned process

Posted on 2007-10-16
2
Medium Priority
?
193 Views
Last Modified: 2013-11-26
I want to start a new process and wait for it to finish processing and quit before I continue from the main process. Any advice on how to achieve this?

0
Comment
Question by:sepknow
2 Comments
 
LVL 20

Assisted Solution

by:REA_ANDREW
REA_ANDREW earned 800 total points
ID: 20084166
you have the event exited.

so

            System.Diagnostics.Process p = new System.Diagnostics.Process();
            p.Exited += new EventHandler(p_Exited);

    void p_Exited(object sender, EventArgs e)
    {
        throw new Exception("The method or operation is not implemented.");
    }

You could simply put in a waithandle and signal it once that event fires.  You can also check the exit code.

Andrew
0
 
LVL 11

Accepted Solution

by:
Deepu Abraham earned 1200 total points
ID: 20084415
Process.WaitForExit () is the function you need to look for ( without wait time)

Best Regards,
DeepuAbrahamK
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Is your OST file inaccessible, Need to transfer OST file from one computer to another? Want to convert OST file to PST? If the answer to any of the above question is yes, then look no further. With the help of Stellar OST to PST Converter, you can e…
Suggested Courses
Course of the Month15 days, 23 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question