Multiple Instances of sweeper and autopatcher = crash

Suggestions for future improvements, adding to scripts, or adding new scripts.
Post Reply
Posts: 55
Joined: Sun Jan 05, 2014 10:51 pm

Multiple Instances of sweeper and autopatcher = crash

Post by older-than-dirt » Sat Jul 26, 2014 7:17 pm

Just an FYI

I accidentally started autopatcher while an instance was running. It crashed.

I accidentally started "sweeper /verbose " while an instance was already running. it looks like it crashes due to not being able to access the log file (this would make sense).

If I'm developing an app where only 1 instance should be allowed, the technique that I usually use is to acquire a known, unique global semaphore at program initialization. If the semaphore doesn't exist, the app creates it and gets it. if it does exist, it means an instance of the app is already running and either exit or push/switch to the already running process, if this behaviour is desired. Just don't forget to remove/release the semaphore when exiting.

User avatar
Site Admin
Site Admin
Posts: 975
Joined: Sun Oct 27, 2013 12:38 am
Location: California

Re: Multiple Instances of sweeper and autopatcher = crash

Post by TheAPGuy » Tue Jul 29, 2014 12:52 am

I didn't add that feature due to the fact that its only a tool not really an application and it wasn't really intended for full release even though I did release it since it was so useful. I had intended to place its functions in autopatcher long ago. Although I did think about adding that ability to AP a while ago, just never go around to it.

Its odd that AP crashed though. It should default to c:\autopatcher.log if it can't create one where it is and then move on.

Post Reply