I can run IDE netbeans --userdir ~/ud1 --cachedir /tmp/cache and concurrently netbeans --userdir ~/ud2 --cachedir /tmp/cache which causes any unexpected problems.
Jesse, can you look into implementing locking cachedir like we do for userdir.
(In reply to comment #0)
> which causes [...] problems.
So do not do that then. How is this a P2?
As to locking cachedir in the same way as userdir, that is not possible since the userdir lock is closely tied to CLIHandler. Simply placing a lock file in the cachedir and releasing it on exit would not work since the lock would be stale if the JVM crashed - handled in the case of userdir by trying to send a command to the supposedly running IDE and clobbering the lock only after a timeout.
Possibly the IDE could write the location of the userdir to some file in the cachedir, deleting it on exit; if encountering an existing marker pointing to a different userdir, it would have to ping that app to see if it was still alive. The last part would require some modifications to CLIHandler (checking for liveness _without_ starting the app if not live) which jtulach would know the most about.
Assigned to new owner.