I have this somewhat unusual process structure:
- Launch4J starts my Java application. It creates a mutex to provide single-instance functionality.
- The Java application starts a VB6 application.
- When the Java application terminates, the VB6 application is still running. (Desired behaviour)
The problem is: The mutex created by Launch4J is only released after the VB6 application terminates. Because of that it's impossible to start the Java application again.
Why would this happen? I'm not opening the mutex explictly...
I first suspected it is because of Java using CreateProcess
with bInheritHandles == true
, but the problem does not occour when I start notepad.exe
for example.
EDIT: I still have this problem. Any pointers are appreciated!