Package: mouseemu Version: 0.15-7 Severity: minor Tags: patch If you run mouseemu as non-root, it crashes rather than exiting gracefully. Patch attached. This was originally reported here:
https://bugs.launchpad.net/ubuntu/+source/mouseemu/+bug/112337 Cheers, -- Colin Watson [EMAIL PROTECTED]
diff -u mouseemu-0.15/debian/patches/63_pidfile.dpatch mouseemu-0.15/debian/patches/63_pidfile.dpatch --- mouseemu-0.15/debian/patches/63_pidfile.dpatch +++ mouseemu-0.15/debian/patches/63_pidfile.dpatch @@ -6,9 +6,9 @@ @DPATCH@ diff -urNad mouseemu-0.15~/mouseemu.c mouseemu-0.15/mouseemu.c ---- mouseemu-0.15~/mouseemu.c 2007-02-08 01:31:42.000000000 +0000 -+++ mouseemu-0.15/mouseemu.c 2007-02-08 01:32:54.000000000 +0000 -@@ -752,6 +752,7 @@ +--- mouseemu-0.15~/mouseemu.c 2007-05-25 17:22:11.000000000 +0100 ++++ mouseemu-0.15/mouseemu.c 2007-05-25 17:23:00.000000000 +0100 +@@ -755,6 +755,7 @@ struct sigaction sa; sigset_t mask, oldmask; @@ -16,12 +16,16 @@ /* SIGHUP and SIGALRM are only useful in the child */ memset(&sa, 0, sizeof(sa)); -@@ -759,6 +760,11 @@ +@@ -762,6 +763,15 @@ sigaction(SIGHUP, &sa, NULL); sigaction(SIGALRM, &sa, NULL); + /* write PID file so the user can signal us for device rescans */ + pidfile = fopen("/var/run/mouseemu.pid", "w"); ++ if (!pidfile) { ++ perror("mouseemu: can't open /var/run/mouseemu.pid"); ++ exit(1); ++ } + fprintf(pidfile, "%d\n", pid); + fclose(pidfile); +