Re: Finding out whether app crashed

Christiaan Hofman <[email protected]> Thu, 7 Jul 2011 19:29:30 +0200
Newsgroups gmane.comp.macosx.devel
Message-ID <[email protected]>
On Jul 7, 2011, at 17:48, Markus Hitter wrote:

>=20
> Am 06.07.2011 um 23:40 schrieb Christiaan Hofman:
>=20
>> Is there a way to figure out at launch time whether my app crashed at =
the last run?
>=20
> 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.
>=20
> The classical Unix place for such stamp files is /var/run.
>=20
>=20
> 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.

Christiaan