close the gui, the leelaz still run in background
Closed this issue · 3 comments
I run the program with following command
D:\leelaz5>type run.bat
@echo off
autogtp -k sga
D:\leelaz5>start javaw -jar LeelaWatcher-1.0.jar . run.bat
or
D:\leelaz5>javaw -jar LeelaWatcher-1.0.jar . run.bat
If I close the gui by click the [x] button, then the leelaz still run in background, I have to finish the process with taskmgr
I use following command, then close gui with press ctrl+c, same question
D:\leelaz5>java -jar LeelaWatcher-1.0.jar . autogtp.exe
autogtp v4
Best network hash: a1151640f6b2c753a36e61f10851bb028dd6068416fbba343cadaa417c365632
Required client version: 2 (OK)
Already downloaded network.
Engine has started.
Infinite thinking time set.
1 (O10)
New Game Started!
Move:O10
2 (Q13) Move:Q13
3 (M18) Move:M18
Thanks for reporting this. I'm actually aware of it. The problem is I need to implement a listener handling window closing event and try to destroy the process I created. It still wouldn't handle the case where the Java GUI was killed, but it would probably be good enough. Away from the machine where I have this checked out. I'll probably look at this and other stuff monday or tuesday.
Interestingly I'm finding that this isn't happening when I Ctrl-C from the window that started the program (in linux/bash at least)