Groups | Search | Server Info | Login | Register
Groups > comp.lang.misc > #11301
| From | Kaz Kylheku <643-408-1753@kylheku.com> |
|---|---|
| Newsgroups | comp.lang.misc, comp.lang.c |
| Subject | Re: Interrupted system call on read after ~20 minutes inactivity? |
| Date | 2025-10-04 01:28 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <20251003182631.24@kylheku.com> (permalink) |
| References | <10bpkh1$25arg$1@dont-email.me> <a1ZDQ.88557$7Ika.30828@fx17.iad> <20251003165522.137@kylheku.com> <10bprrj$2l08$2@artemis.inf.ed.ac.uk> |
Cross-posted to 2 groups.
On 2025-10-04, Richard Tobin <richard@cogsci.ed.ac.uk> wrote:
> In article <20251003165522.137@kylheku.com>,
> Kaz Kylheku <643-408-1753@kylheku.com> wrote:
>
>>On Linux, I think signal() has the BSD semantics for restarting;
>>for every signal, SA_RESTART is used unless you use siginterrupt()
>>to indicate otherwise for specific signals.
>
> Linux signal() has the System V semantics, and replacing the call to
> signal with sigaction and SA_RESTART fixes the problem.
Empirical test tracing signal to bsd_signal. So, bit of a mystery:
$ cat > signal.c
#include <signal.h>
int main()
{
signal(SIGTERM, SIG_DFL);
return 0;
}
$ make signal
cc signal.c -o signal
$ ldd signal
linux-vdso.so.1 (0x000015555551b000)
libc.so.6 => /lib64/libc.so.6 (0x0000155555200000)
/lib64/ld-linux-x86-64.so.2 (0x000015555551d000)
$ nm -D signal | grep signal
U signal@GLIBC_2.2.5
$ nm -D /lib64/libc.so.6 | grep signal
000000000003e940 W bsd_signal@@GLIBC_2.2.5
0000000000095620 T cnd_signal@GLIBC_2.28
0000000000095620 T cnd_signal@@GLIBC_2.34
U _dl_signal_error@GLIBC_PRIVATE
U _dl_signal_exception@GLIBC_PRIVATE
000000000003e980 W gsignal@@GLIBC_2.2.5
000000000005bc00 T psignal@@GLIBC_2.2.5
000000000008b2e0 T pthread_cond_signal@@GLIBC_2.3.2
0000000000089f40 T pthread_cond_signal@GLIBC_2.2.5
000000000003e940 W signal@@GLIBC_2.2.5
00000000001144a0 T signalfd@@GLIBC_2.7
000000000003e940 W ssignal@@GLIBC_2.2.5
000000000009f830 T strsignal@@GLIBC_2.2.5
000000000003f530 T __sysv_signal@@GLIBC_2.2.5
000000000003f530 W sysv_signal@@GLIBC_2.2.5
$ nm -D /lib64/libc.so.6 | grep 000000000003e940
000000000003e940 W bsd_signal@@GLIBC_2.2.5
000000000003e940 W signal@@GLIBC_2.2.5
000000000003e940 W ssignal@@GLIBC_2.2.5
--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca
Back to comp.lang.misc | Previous | Next — Previous in thread | Next in thread | Find similar
Interrupted system call on read after ~20 minutes inactivity? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-04 00:59 +0200
Re: Interrupted system call on read after ~20 minutes inactivity? scott@slp53.sl.home (Scott Lurndal) - 2025-10-03 23:31 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-04 01:57 +0200
Re: Interrupted system call on read after ~20 minutes inactivity? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-10-04 00:28 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-04 02:41 +0200
Re: Interrupted system call on read after ~20 minutes inactivity? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-10-04 01:07 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? richard@cogsci.ed.ac.uk (Richard Tobin) - 2025-10-04 01:04 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-10-04 01:23 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-10-04 01:28 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? scott@slp53.sl.home (Scott Lurndal) - 2025-10-04 02:12 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-04 02:35 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? richard@cogsci.ed.ac.uk (Richard Tobin) - 2025-10-04 12:52 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Kaz Kylheku <643-408-1753@kylheku.com> - 2025-10-04 18:50 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Alan Bawden <alan@csail.mit.edu> - 2025-10-03 19:33 -0400
Re: Interrupted system call on read after ~20 minutes inactivity? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-03 23:54 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-04 02:00 +0200
Re: Interrupted system call on read after ~20 minutes inactivity? Alan Bawden <alan@csail.mit.edu> - 2025-10-03 20:26 -0400
Re: Interrupted system call on read after ~20 minutes inactivity? richard@cogsci.ed.ac.uk (Richard Tobin) - 2025-10-05 11:39 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Alan Bawden <alan@csail.mit.edu> - 2025-10-06 04:05 -0400
Re: Interrupted system call on read after ~20 minutes inactivity? richard@cogsci.ed.ac.uk (Richard Tobin) - 2025-10-06 10:46 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Lawrence D’Oliveiro <ldo@nz.invalid> - 2025-10-06 22:04 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? richard@cogsci.ed.ac.uk (Richard Tobin) - 2025-10-04 00:18 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-04 02:27 +0200
Re: Interrupted system call on read after ~20 minutes inactivity? scott@slp53.sl.home (Scott Lurndal) - 2025-10-04 02:13 +0000
Re: Interrupted system call on read after ~20 minutes inactivity? "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> - 2025-10-05 11:43 -0700
Re: Interrupted system call on read after ~20 minutes inactivity? Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2025-10-07 16:29 +0200
csiph-web