Groups | Search | Server Info | Login | Register
Groups > comp.lang.misc > #11333
| From | "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> |
|---|---|
| Newsgroups | comp.lang.misc, comp.lang.c |
| Subject | Re: Interrupted system call on read after ~20 minutes inactivity? |
| Date | 2025-10-05 11:43 -0700 |
| Organization | A noiseless patient Spider |
| Message-ID | <10bue8l$3lp7f$1@dont-email.me> (permalink) |
| References | <10bpkh1$25arg$1@dont-email.me> <10bpp4n$2l08$1@artemis.inf.ed.ac.uk> |
Cross-posted to 2 groups.
On 10/3/2025 5:18 PM, Richard Tobin wrote: > In article <10bpkh1$25arg$1@dont-email.me>, > Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote: > >> In context of a Genie (Algol 68) program, after leaving the >> terminal some minutes while the program was waiting in a 'read', >> the program terminated by an interrupt. So I set up this simple >> call to reproduce it... - it gets interrupted after ~21 minutes >> of inactivity. > > [...] > >> The maintainer of the Genie system told me that he has no such >> logic implemented in his tool > > The maintainer is mistaken. > > If you look in a68g-io.c you will see that the function io_read_conv() > returns -1 if read() returns EINTR more than MAX_RESTART+1 (257) times. Ohhh. Reminds me of debugging a race condition many years ago that used sem_wait. I noticed that it was not looping back around when EINTR was encountered. > > If you look in a68-bits.c you will see that setitimer() is called with > an interval of INTERRUPT_INTERVAL (5) seconds at the start and is > called again whenever the handler gets run. > > Your read therefore fails after 258*5 = 1290 seconds. > > (The intention of all this seems to be a to implement a cpu time > limit, but it also has this presumably undesired effect.) > > On a system where read() is automatically restarted after SIGALRM > is handled, none of this will happen.
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