Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 922273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T19:00:11+00:00 2026-05-15T19:00:11+00:00

We have a launcher app that does some setup (starting a server), launches a

  • 0

We have a launcher app that does some setup (starting a server), launches a child process, waits (via a worker thread) for the child process to exit, and then does some cleanup (stopping the server). This is already in place and works fine.

However, some of our apps can launch other apps. So for example, the launcher might start app A, and then I might click a button in app A that starts app B. Then I close app A, the launcher’s Process.WaitForExit call returns, and the launcher stops the server — unaware that app B is still running. We only use the launcher for development testing, so this isn’t a crisis, but it’s inconvenient when app B tries to talk to the server and crashes.

What’s the best way to start a child process, and then wait for it (and any of its children) to exit?

These apps (both the launcher and the apps being launched) are all in .NET. It’s fine if I have to write special code (e.g. opening a named semaphore) in each app to make this work; I’m just not sure of the best way to do it.

Bonus points if there’s some way to only wait for my apps to finish — e.g., if my app launches Notepad, I don’t want to wait for Notepad to close; I just want to wait on apps that need the server. But this isn’t a requirement, just a nicety.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T19:00:12+00:00Added an answer on May 15, 2026 at 7:00 pm

    Change the condition of the server shutting down in the launcher app. Only shutdown the server, if none of your process names are running. You can periodically check for your process names. Shutdown the server if none found.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a button that launches the google maps app on my device via
We have a VB6 app that launches our .NET code upon startup. Cold start
I have a simple app that downloads some data from a webservice and displays
I have an android app that is setup to start a Java activity (call
I have an App which launches the google Map App. The code is: UIApplication
I have an app where I need a BOOL value to persist across launches.
I have a widget that acts as a launcher on the home screen. How
I have a small command-line application written in C that acts as a wrapper/launcher
I have a minimal program that does little more than let me set two
We have a scripting engine (running under Windows) that launches another application several thousand

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.