enonic / cli-enonic

GNU General Public License v3.0
41 stars 2 forks source link

CLI can't stop a running sandbox #535

Closed alansemenov closed 6 months ago

alansemenov commented 7 months ago

When CLI suggests to start a sandbox while there's another sandbox running it and user agrees to stop the running one, CLI fails to do so even though PID is correct.

image
alansemenov commented 7 months ago

Seems like enonic sandbox start fires up two processes: one called enonic and another called java. It's the PID of the first one that gets saved to the .enonic file and that's the one CLI tries to stop but fails. Ctrl-C would correctly kill both processes.

pmi commented 7 months ago

Hmm, there are 2 enonic processes and 1 java on windows, and it seem to stop all of them correctly on Windows.

It's going to kill all when you press ctrl+c because killing parent process kills children too .

But when starting a new sandbox with another running it's going to start NEW java process right after it stopped the old one. You can see that by change of the PID of java process.

If that is not the case, it needs to be debugged by someone having osx I'm afraid.