From d4c864e92f89003e73883fe0b259e6c2e3bfb4f3 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Sun, 19 Apr 2026 00:02:16 +0200 Subject: UNIX: do not automatically restart syscalls on SIGINT * signal() sets SA_RESTART by default. * Some syscalls can theoretically block indefinitely. Even opening a special file could result in an indefinitely blocking operation, that should be interruptible. You must still poll teco_interrupted in these read() loops of course. * Also makes sure that clipboard operations are interruptible even if $SCITECO_CLIPBOARD_GET blocks. Although I couldn't provoke problems in practice, I did observe hangs with xclip on Wayland on Linux, that could only be resolved by manually killing xclip. --- configure.ac | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 673fb33..e703aed 100644 --- a/configure.ac +++ b/configure.ac @@ -215,7 +215,7 @@ case $host in *-*-linux* | *-*-*bsd* | *-*-darwin* | *-*-cygwin* | *-*-haiku*) # NOTE: Keep this on a single line for compatibility # with ancient versions of Autoconf. - AC_CHECK_FUNCS([realpath readlink pathconf fchown dup dup2 getpid open read kill mmap popen pclose isatty fork execv setsid], , [ + AC_CHECK_FUNCS([realpath readlink pathconf fchown dup dup2 getpid open read kill mmap popen pclose isatty fork execv setsid sigaction], , [ AC_MSG_ERROR([Missing libc function]) ]) AC_SEARCH_LIBS(dladdr, [dl], , [ -- cgit v1.2.3