Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hard stop not working on Windows #25

Open
ghost opened this issue Jul 21, 2017 · 1 comment
Open

Hard stop not working on Windows #25

ghost opened this issue Jul 21, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 21, 2017

Hi,

while using CompileDaemon on Windows 10 Pro I encountered a strange problem. When I run it as follows

CompileDaemon.exe -command="hello.exe"

I get the following output

2017/07/21 06:24:36 Running build command!
2017/07/21 06:24:37 Build ok.
2017/07/21 06:24:37 Restarting the given command.
2017/07/21 06:24:37 stdout: RUNNING6
2017/07/21 06:24:44 Running build command!
2017/07/21 06:24:45 Build ok.
2017/07/21 06:24:45 Hard stopping the current process..
2017/07/21 06:24:45 Could not kill child process. Aborting due to danger of infinite forks.

For debugging purposes I compiled CompileDaemon myself and added a print statement under the kill statement of the process. There I get the following error message :

TerminateProcess: Access denied

Obviously it isn't possible to kill a process on Windows which was created by exec.Command. Do you have an idea what can be done to fix this problem?

Thanks,
Thomas

@ghost
Copy link
Author

ghost commented Jul 21, 2017

I have found the error myself. I read from stdin in the child program which blocked CompileDaemon from killing the process. After removing the reading from stdin it works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants