Running only one instance of the app
schveiguy at gmail.com
Thu Dec 2 13:28:12 UTC 2021
On 12/2/21 7:05 AM, Bagomot wrote:
> This works for Windows. I need something similar for Linux and Macos.
> Tell me how, if you know. Maybe the standard library D already has the
> required functionality? Or are there better ways to only run one
> instance of the app?
Typically this is done using pid files.
But I don't know if MacOS has a specialized call for it, or if you have
to do it yourself. I think you need to lock the file with `flock` to get
it to work properly.
More information about the Digitalmars-d-learn