[Pkg-hpijs-devel] Bug#569976: does this help?

Mark Hedges hedges at formdata.biz
Fri Mar 18 18:08:50 UTC 2011


Does this patch help?  It seems like only the parent should
attempt the lock.  I will try it out for a while.  --mark--

--- /usr/bin/hp-systray.orig    2011-03-18 11:01:58.000000000 -0700
+++ /usr/bin/hp-systray 2011-03-18 11:04:40.000000000 -0700
@@ -82,7 +82,10 @@
             log.warn("No hp: or hpfax: devices found in any installed CUPS queue. Exiting.")
             sys.exit(1)

-    mod.lockInstance()
+    # only attempt the lock if this pid is the session leader,
+    # otherwise it creates a race condition where children get there first
+    if os.getpgid(os.getpid()) == os.getpid():
+        mod.lockInstance()

     r1, w1 = os.pipe()
     log.debug("Creating pipe: hpssd (%d) ==> systemtray (%d)" % (w1, r1))

-------------- next part --------------
A non-text attachment was scrubbed...
Name: hp-systray.patch
Type: text/x-diff
Size: 624 bytes
Desc: hp-systray.patch
URL: <http://lists.alioth.debian.org/pipermail/pkg-hpijs-devel/attachments/20110318/df2ad366/attachment.patch>


More information about the Pkg-hpijs-devel mailing list