unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Christopher Baines <mail@cbaines.net>
To: 53139@debbugs.gnu.org
Subject: bug#53139: sleep return value error, with pselect6 system call on Linux
Date: Sun, 09 Jan 2022 09:58:19 +0000	[thread overview]
Message-ID: <877db9b505.fsf@cbaines.net> (raw)

The sleep procedure is documented as returning 0 when it's not
interrupted by a signal.

This behaviour seems to have changed in guile as distributed by GNU Guix
(see the time-machine commands below). Previously, guile used the select
system call which seemed to change the timeout argument to the time
left. The updated guile uses the pselect6 system call, which doesn't do
this.

→ guix time-machine --commit=b603554ed044638dd40b6863d5dada59eefe03b8 -- environment --ad-hoc guile -- guile -c '(peek (sleep 5))'

;;; (0)

select(4, [3], NULL, NULL, {tv_sec=5, tv_usec=0}) = 0 (Timeout)

→ guix time-machine --commit=6dffced09ecda024e0884e352778c221ad066fd6 -- environment --ad-hoc guile -- guile -c '(peek (sleep 5))'

;;; (5)

pselect6(4, [3], NULL, NULL, {tv_sec=5, tv_nsec=0}, NULL) = 0 (Timeout)





                 reply	other threads:[~2022-01-09  9:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877db9b505.fsf@cbaines.net \
    --to=mail@cbaines.net \
    --cc=53139@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).