Post by Christiaan Hofman Is there a way to figure out at launch time whether my app crashed at the last run?
Create a file somewhere at application start and remove it at normal application close. In case of an unexpected abort, the file is still there at the next app launch.
The classical Unix place for such stamp files is /var/run.
Post by Christiaan Hofman Is there a way to figure out at launch time whether my app crashed at the last run?
Create a file somewhere at application start and remove it at normal application close. In case of an unexpected abort, the file is still there at the next app launch. The classical Unix place for such stamp files is /var/run. Markus
Is this really the preferred way of doing this?
I can imagine that somehow another instance of the app is launched, and this will notice that the last launched instance was running and was not (yet) terminated. That gives the wrong result.
Post by Christiaan Hofman Is there a way to figure out at launch time whether my app crashed at the last run?
Create a file somewhere at application start and remove it at normal application close. In case of an unexpected abort, the file is still there at the next app launch. The classical Unix place for such stamp files is /var/run. Markus
Is this really the preferred way of doing this? I can imagine that somehow another instance of the app is launched, and this will notice that the last launched instance was running and was not (yet) terminated. That gives the wrong result.
Whether this is the best way to do it on OS X with a regular GUI type app, is not something I will address, as I don't know. However, things like pid get stored in these little files so the new app can check if the pid is still running or not so it knows if the app is a real other process app or a crashed app.