-
Notifications
You must be signed in to change notification settings - Fork 12
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
How to solve this? ValueError: invalid signal error #23
Comments
@lengelberts I believe the issue is that the system, by default, is setting signal handlers for signals that are not supported in Windows. Here are the signals for which we register handlers: kill_signals = (
2, # SIGINT
3, # SIGQUIT
6, # SIGABRT
15, # SIGTERM
) but Windows does not support SIGQUIT (https://docs.python.org/2/library/signal.html#signal.signal). One possible way to start would be to make a subclass of the signal handler that uses a different set of signals even if that is the same set minus SIGQUIT. I'm not sure what other changes would need to happen for Windows support as I originally made this library with the intent on managing daemons in a unix/linux type of environment. |
Thank you @kevinconway for your quick reply! This seems to be a reasonable explanation indeed. In that case I will for now just avoid using Windows. |
@kevinconway It might be nice to say in the setup.py that this package is only for MacOS and Unix. You can do this by for example adding
as an argument to |
I am trying to work with SimulaQron (https://github.com/SoftwareQuTech/SimulaQron) on my Windows. However, when I want to start it (via "simulaqron start") I run into the error "ValueError: invalid signal error". The error seems to result from daemons:
Therefore, I tried the example on https://github.com/kevinconway/daemons and this indeed gave the same error:
Here foo2.py is the second .py file as indicated in the example, so the one with "
if __name__
".It seems to me that the problem is with pidfile. The value for pidfile in
d = SleepyDaemon(pidfile=pidfile)
is in my case:C:\Users\Lynn\Documents\Capstone\testdaemon sleepy.pid
(Here, testdaemon is the directory in which the files of the example are stored.)
I am wondering if someone has an idea what is causing this problem. It would be great to fix this so that I (and others) could work with SimulaQron and daemons via Windows.
The text was updated successfully, but these errors were encountered: