+2005-01-22 Christopher Faylor <cgf@timesys.com>
+
+ * pinfo.cc (pinfo::maybe_set_exit_code_from_windows): Make sure that
+ process has exited before getting an error code.
+ (pinfo::exit): "cd" to innocuous location before exiting to make sure
+ that process does not keep the current working directory busy while it
+ is in the process of really exiting.
+
2005-01-18 Corinna Vinschen <corinna@vinschen.de>
* autoload.cc (CoInitialize): Remove.
DWORD oexitcode = self->exitcode;
if (hProcess && !(self->exitcode & EXITCODE_SET))
{
+ WaitForSingleObject (hProcess, INFINITE); // just to be safe, in case
+ // process hasn't quite exited
+ // after closing pipe
GetExitCodeProcess (hProcess, &x);
self->exitcode = EXITCODE_SET | (x & 0xff) << 8;
}
maybe_set_exit_code_from_windows ();
if (n != EXITCODE_NOSET)
- self->alert_parent (0);
+ {
+ SetCurrentDirectory ("c:\\");
+ self->alert_parent (0);
+ }
int exitcode = self->exitcode;
release ();