You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am using python 3.7.0, gnupg 2.3.1 in centos 7.
i want to build a daemon for my service and add a function that monitors the sigchild signal, and restart my service whenever it crashes
i think the daemon code should be right.
when i add the monitor&restart function, it can work correctly with a simple service:
while True:
print(1)
time.sleep(5)
but something wrong when i use gnupg in my service code, even like this simple demo:
time.sleep(3)
print('start')
import gnupg
gnupg.GPG(homedir='/root/.gnupg')
while True:
print(1)
time.sleep(5)
the daemon catch so many sigchild signal, and the log show that maybe something go wrong in .../gunpg/_meta/_check_sane_and_get_gpg_version(func)/_read_data(func)/log.debug("Reading data from stream %r..." % stream.repr())
i try to seek for the reason, but i can't handle this question.
but i find if i cancel the function _check_sane_and_get_gpg_version call, the restart function will work.
so i think maybe my daemon code make the proc = self.open_subprocess(["--list-config", "--with-colons"])going wrong.
can anyone help me to figure out the cause?
thanks!
this is my daemon code daemon.zip
The text was updated successfully, but these errors were encountered:
i am using python 3.7.0, gnupg 2.3.1 in centos 7.
i want to build a daemon for my service and add a function that monitors the sigchild signal, and restart my service whenever it crashes
i think the daemon code should be right.
when i add the monitor&restart function, it can work correctly with a simple service:
but something wrong when i use gnupg in my service code, even like this simple demo:
the daemon catch so many sigchild signal, and the log show that maybe something go wrong in .../gunpg/_meta/_check_sane_and_get_gpg_version(func)/_read_data(func)/log.debug("Reading data from stream %r..." % stream.repr())
i try to seek for the reason, but i can't handle this question.
but i find if i cancel the function _check_sane_and_get_gpg_version call, the restart function will work.
so i think maybe my daemon code make the
proc = self.open_subprocess(["--list-config", "--with-colons"])
going wrong.can anyone help me to figure out the cause?
thanks!
this is my daemon code
daemon.zip
The text was updated successfully, but these errors were encountered: