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

daemonize does not work with Py3 #310

Open
kwaegema opened this issue Mar 10, 2021 · 1 comment
Open

daemonize does not work with Py3 #310

kwaegema opened this issue Mar 10, 2021 · 1 comment
Assignees
Labels

Comments

@kwaegema
Copy link
Member

backupsync stopped working

2021-03-10 14:45:24,471 INFO       zkrsync         MainThread  Logging to file /tmp/zkrsync/kyukonhome-dest-4224.log:
Traceback (most recent call last):
  File "/usr/bin/zkrsync", line 293, in <module>
    main()
  File "/usr/bin/zkrsync", line 288, in main
    zkrsdaemon.start()
  File "/usr/lib/python3.6/site-packages/vsc/utils/daemon.py", line 99, in start
    self.daemonize()
  File "/usr/lib/python3.6/site-packages/vsc/utils/daemon.py", line 68, in daemonize
    se = open(self.stderr, 'a+', 0)
ValueError: can't have unbuffered text I/O
@boegel
Copy link
Member

boegel commented Mar 10, 2021

So the question is whether it really need to be unbuffered. If so, we need to use ba+. If not, we can just drop the 0.

As @wdpypere pointed out, this problem was introduced (in some sense, since it still works for Python 2 afaik?) in c5c7481, and we overlooked breaking it because there's no tests (or not enough) covering the code in daemon.py.

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

No branches or pull requests

2 participants