Sunday, April 17, 2022

[bugfix] x11/notion enable SA_RESTART signal

Hello,

I finally managed to track down why notion sporadically crashes and why
lua statusbars that invoke commands and read their stdout are (quite
frequently) erroring out with "Interrupted by system call" once there is
load on the system.

The culprint is the missing SA_RESTART signal, which is needed when
doing file i/o in lua with popen(3).

I'm removing the _XOPEN_SOURCE and _XOPEN_SOURCE_EXTENDED restrictions
to free up access to the signal, which is behind __XPG_VISIBLE >= 500.

While the issue is more sporadic in notion itself, I can reliably
reproduce it by putting load on my system and let my statusbar popen a
shell script and read its stdout.

OK?

Best Regards,
Stefan

Index: x11/notion/Makefile
===================================================================
RCS file: /home/cvs/ports/x11/notion/Makefile,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 Makefile
--- x11/notion/Makefile 11 Mar 2022 20:16:49 -0000 1.2
+++ x11/notion/Makefile 17 Apr 2022 18:18:39 -0000
@@ -3,6 +3,7 @@ COMMENT= light, keyboard friendly static
GH_ACCOUNT= raboof
GH_PROJECT= notion
GH_TAGNAME= 4.0.2
+REVISION= 0

CATEGORIES= x11

Index: x11/notion/patches/patch-libmainloop_signal_c
===================================================================
RCS file: x11/notion/patches/patch-libmainloop_signal_c
diff -N x11/notion/patches/patch-libmainloop_signal_c
Index: x11/notion/patches/patch-system-autodetect_mk
===================================================================
RCS file: /home/cvs/ports/x11/notion/patches/patch-system-autodetect_mk,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 patch-system-autodetect_mk
--- x11/notion/patches/patch-system-autodetect_mk 11 Mar 2022 20:16:49 -0000 1.2
+++ x11/notion/patches/patch-system-autodetect_mk 18 Apr 2022 05:46:48 -0000
@@ -30,3 +30,12 @@ Index: system-autodetect.mk

# Cygwin needs this. Also when you disable _BSD_SOURCE you may need it.
#DEFINES += -DCF_NO_GETLOADAVG
+@@ -205,7 +205,7 @@ POSIX_SOURCE?=-D_POSIX_C_SOURCE=200112L
+ BSD_SOURCE?=-D_BSD_SOURCE
+
+ # Most systems
+-XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
++#XOPEN_SOURCE=-D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED
+ # SunOS, (Irix)
+ #XOPEN_SOURCE=-D__EXTENSIONS__
+

No comments:

Post a Comment