Creating a lock file (say, in /tmp) is a common approach. On launch, check to see if the file already exists. If it does, exit. Otherwise, create it and continue. This can lead to problems if your app ...
There was a time when trying to learn to write low-level driver or kernel code was hard. You really needed two machines: one to work with, and one to screw up over and over again until you got it ...