Solved

How to make Parent process know that child process has completed?

Posted on 1998-11-12
1
194 Views
Last Modified: 2013-11-20
Iam using Winexec API to execute a dos exe for formatting disk  and when i call this function that dos exe is running in a separate process(child) and parent is going to execute next stmt. but only when that child process(i.e formatting) has completed then only parent should go to next stmt. execution how to know whether child has completed execution so that i can go to next stmt.? I have seen Spawn and exec functions to run dos exe but they are not supported in Win3.11 Please help me? I want in Windows(16bit).
0
Comment
Question by:yenkamma
1 Comment
 
LVL 1

Accepted Solution

by:
fstab earned 100 total points
Comment Utility
Use the exec line of functions instead of WinExec. Additionally if you have control over the source code for the program which you are exec'ing, you can have it create a temporary file on your hard drive in the temp folder. The main program (which execs program 2) can wait in a loop to check if that file exists (using the stat function).

Hope this helps (BTW are you from Andhra?)
fstab.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now