On 09/18/2012 11:31 AM, Rich Walsh wrote:
>
> So... what app is calling DosStartSession()? (PMMail, I'd guess.)
> What program is it starting? Are you positive that it needs a new session?
> Does your app (or some functionality therein) have to block until this
> mystery process terminates? Etc, etc.
>
Yes, PMMail.
It is starting stunnel, a security proxy. Stunnel provides encrypted
data transfer for PMMail.
It originally used DosExecPgm() to start stunnel. DosStartSession()
can start a program without inheriting the current environment and file
handles. It was more of a debugging effort to eliminate a possibility
than any actual advantage of DosStartSession(). I then wanted to know if
the program was actually running, or be notified when it quit. Hence the
posting.
(The problem I am having is with files being closed but randomly
unavailable, sometimes for many seconds. For instance, a file is
created, written, closed, all with standard C functions. That file may
then be copied to another file, or renamed. In either case, sometimes
the copy/rename returns error 13, Permission Denied.
The last time I had a similar problem was when an external program was
started that inherited file handles, and closed those inherited handles
when it quit. The parent process was not pleased.)
> Also, have you considered using WinStartApp()?
>
No, I had not.