daemonize
daemonize copied to clipboard
Daemonize does not work with requests library
The following code fails on my Mac OS X in daemon but not in foreground mode:
import requests
def main():
while True:
requests.get('https://httpbin.org/get')
sleep(10)
daemon = Daemonize(app="demo_app", pid="/tmp/demo_app.pid", action=main)
daemon.start()
I'm using Python 3.8.5, daemonize 2.5.0 and requests 2.24.0
It would be beneficial to see how it fails, what error or traceback is produced.
https://github.com/thesharp/daemonize/issues/75#issuecomment-890829014
In general, fork() is very broken on OSX, so this issue might be caused by that. Can you look at Console.app and include the traceback, per the instructions in #75 ?