On Tue, Jun 9, 2009 at 11:12 PM, Erg Consultant<[email protected]> wrote: > I later monitor the pid that I squirreled away from within a periodic timer: > > err = GetProcessForPID( pid, &psn ); > > If GetProcessForPID returns an error, I know the process is not running.
No you don't. If GetProcessForPID returns an error, you know the process is not running OR has not checked in with the window server yet. A process can take an arbitrary amount of time to check in with the window server. If this is your problem with Rosetta, then it's simply exposing a bug in your code. You need to fix it to handle the case where GetProcessForPID returns an error for a process that is alive. This can and will happen. If you want to see if the process is running, check for its existence directly (like with [task isRunning]) not by seeing if it has a PSN. Many processes do not have PSNs, including every process you launch with NSTask until they check in with the window server, if they ever do. Mike _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
