While running my UI application as LaunchAgent I sometimes get dual running processes on the same user instead of one (which is reflected on the screen by duplicated identical windows). I guess this happen because of a race, I manually load the agent while it can also be monitored and executed when the related plist file is created inside /Library/LaunchAgents.

How can I enforce single/unique process per user. perhaps there's a dedicated plist flag for this demand ?

closed as off-topic by Tetsujin, Graham Miln, IconDaemon, JMY1000, Allan Feb 5 '18 at 9:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about software development are off-topic here, but can be asked on Stack Overflow." – Tetsujin, Graham Miln, IconDaemon, JMY1000
If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged .