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

"while 1" at the end of yubiserve.py #26

Closed
GoogleCodeExporter opened this issue Dec 7, 2015 · 4 comments
Closed

"while 1" at the end of yubiserve.py #26

GoogleCodeExporter opened this issue Dec 7, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

I noticed the :
  while 1:
          time.sleep(1)
at the end of yubiserve.py.

I am not a python expert but that seems not very good.

If you remove :
  http_thread.setDaemon(True)
  ssl_thread.setDaemon(True)

you can remove the "while 1" block with no harm.

Regards

Original issue reported on code.google.com by maxime.d...@gmail.com on 12 Mar 2013 at 4:41

@GoogleCodeExporter
Copy link
Author

I've just tried your changes.  The unit tests  pass, but, when I start 
yubiserve.py from the command line, crtl-c no longer works to stop it.

This link might offer some details:
http://www.regexprn.com/2010/05/killing-multithreaded-python-programs.html

I am not expert enough to solve this, and think that it does need to respond to 
ctrl-c.

If you can provide a patch that works, and keeps ctrl-c also working, I would 
be happy to accept it.


Original comment by glen.ogilvie@gmail.com on 12 Mar 2013 at 9:46

@GoogleCodeExporter
Copy link
Author

Hello

Here is the patch ;-)

I also change call to "quit()"  to "sys.exit(0)" since :
"useful for the interactive interpreter shell and should not be used in 
programs."
from :
http://docs.python.org/2/library/constants.html#constants-added-by-the-site-modu
le

Regards

Original comment by maxime.d...@gmail.com on 13 Mar 2013 at 8:27

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi Maxime, 
Thank you for the patch. I've applied it, as SVN Rev: 63.

If you are interested in working on the project more, then we may be able to 
give you commit access.





Original comment by glen.ogilvie@gmail.com on 17 Mar 2013 at 9:33

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

> If you are interested in working on the project more, then we may be able to 
give you commit access.
Thanks a lot, but not for now.

Original comment by maxime.d...@gmail.com on 18 Mar 2013 at 7:10

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

No branches or pull requests

1 participant