Paramiko inside Python Daemon causes IOError

view full story

http://stackoverflow.com – I'm trying to execute ssh commands using paramiko from inside a python daemon process. I'm using the following implementation for the daemon: https://pypi.python.org/pypi/python-daemon/ When the program is started pycrypto raises an IOError with a Bad file descriptor when paramiko tries to connect. If I remove the daemon code (just uncomment the last line and comment the two above) the ssh connection is established as expected. The code for a short test program looks like this: #!/usr/bin/env python2 from daemon import runner import paramiko class App(): def __init__(self): se (HowTos)