Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsafe checking of running instance #10

Merged
merged 1 commit into from
Aug 11, 2011

Conversation

Pegolon
Copy link
Contributor

@Pegolon Pegolon commented Jul 27, 2011

Hi,
I have just had some problems with the code that checks if the destination application is already running. Strangely enough the call to NSTask came not back and the application crashed. After further investigation I have found a much cleaner way to check for running applications. Maybe you want to pull the code into your branch.
Cheers,
Markus

Use NSWorkspace for checking for running instance, instead of NSTask with a shell

@andypotion
Copy link
Collaborator

Thanks for figuring out the crash. Was it happening on Mac OS X 10.7 or 10.6?

I see that -[NSWorkspace runningApplications] is available from 10.6 and up so we'll have to do two different things based on the OS version.

Did you test this on both 10.6 and 10.7?

@Pegolon
Copy link
Contributor Author

Pegolon commented Jul 28, 2011

Andy,
it happened on both system. Unfortunately the crash was silent, it just did not return from the call. Since my application has a minimum system requirement of 10.6 it did not bother the availability of [NSWorkspace runningApplications].
I have tested my changes in both 10.7 and 10.6.
Cheers,
Markus

andypotion pushed a commit that referenced this pull request Aug 11, 2011
Unsafe checking of running instance
@andypotion andypotion merged commit 574238c into potionfactory:master Aug 11, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants