hplip/hplip-systray-blockerror.patch
Petr Šabata 3b7ae335f3 RHEL 9.0.0 Alpha bootstrap
The content of this branch was automatically imported from Fedora ELN
with the following as its source:
https://src.fedoraproject.org/rpms/hplip#7cb6f648cdb35a0f018b511d10b516d6d9e4d638
2020-10-15 12:26:13 +02:00

21 lines
568 B
Diff

diff --git a/systray.py b/systray.py
index 07db0fa..3a35b30 100644
--- a/systray.py
+++ b/systray.py
@@ -89,7 +89,14 @@ if __name__ == '__main__':
log.debug("Creating pipe: hpssd (%d) ==> systemtray (%d)" % (w1, r1))
parent_pid = os.getpid()
- child_pid1 = os.fork()
+ try:
+ child_pid1 = os.fork()
+ except BlockingIOErrror as e:
+ log.error("hp-systray: error during fork - %s" % e)
+ os.close(w1)
+ os.close(r1)
+ mod.unlockInstance()
+ sys.exit(1)
if child_pid1:
# parent (UI)