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 ?