Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!spool.mu.edu!think.com!zaphod.mps.ohio-state.edu!wuarchive!mit-eddie!uw-beaver!ubc-cs!unixg.ubc.ca!cheddar.ucs.ubc.ca!ballard From: ballard@cheddar.ucs.ubc.ca (Alan Ballard) Newsgroups: comp.os.os2.misc Subject: Re: Stopping processes Message-ID: <1991Mar5.231640.2055@unixg.ubc.ca> Date: 5 Mar 91 23:16:40 GMT References: <1991Mar4.151549.10409@praxis.co.uk> Sender: news@unixg.ubc.ca (Usenet News Maintenance) Organization: Computing Services, University of British Columbia Lines: 23 In article <1991Mar4.151549.10409@praxis.co.uk> graeme@praxis.co.uk (Graeme Cutler) writes: >... The function call would issue >DosExecPgm and start a timer process, timer.exe. > >The function call would return the process id so that if the calling >thread so wished it would be able to issue a DosKillProcess using the PID >of the process it started. > >But I have (apparently?) misunderstood the RESULTCODES structure returned >from issuing the DosExecPgm. I assumed that it returned the PID of the >newly started process. Does not appear to(?) ;-( > DosExecPgm DOES return the PID, as long as the fExecFlags parameter is set to EXEC_ASYNC or EXEC_ASYNCRESULT. I've used it in the way you describe (for later killing the process) without any problem. Alan Ballard | Internet: ballard@ucs.ubc.ca University Computing Services | Bitnet: USERAB1@UBCMTSG University of British Columbia | Phone: 604-228-3074 Vancouver B.C. Canada V6R 1W5 | Fax: 604-228-5116