From unknown Wed Sep 10 09:37:42 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#53139 <53139@debbugs.gnu.org> To: bug#53139 <53139@debbugs.gnu.org> Subject: Status: sleep return value error, with pselect6 system call on Linux Reply-To: bug#53139 <53139@debbugs.gnu.org> Date: Wed, 10 Sep 2025 16:37:42 +0000 retitle 53139 sleep return value error, with pselect6 system call on Linux reassign 53139 guile submitter 53139 Christopher Baines severity 53139 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 09 05:03:32 2022 Received: (at submit) by debbugs.gnu.org; 9 Jan 2022 10:03:32 +0000 Received: from localhost ([127.0.0.1]:49250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n6V2x-0008Oi-TL for submit@debbugs.gnu.org; Sun, 09 Jan 2022 05:03:32 -0500 Received: from lists.gnu.org ([209.51.188.17]:49180) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n6V2v-0008Oa-HX for submit@debbugs.gnu.org; Sun, 09 Jan 2022 05:03:30 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59046) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n6V2v-0007Uz-Ca for bug-guile@gnu.org; Sun, 09 Jan 2022 05:03:29 -0500 Received: from mira.cbaines.net ([212.71.252.8]:36242) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n6V2t-0002wC-Q3 for bug-guile@gnu.org; Sun, 09 Jan 2022 05:03:29 -0500 Received: from localhost (unknown [IPv6:2a02:8010:68c1:0:8ac0:b4c7:f5c8:7caa]) by mira.cbaines.net (Postfix) with ESMTPSA id D910727BBE9 for ; Sun, 9 Jan 2022 10:03:23 +0000 (GMT) Received: from capella (localhost [127.0.0.1]) by localhost (OpenSMTPD) with ESMTP id 5969ab14 for ; Sun, 9 Jan 2022 10:03:22 +0000 (UTC) User-agent: mu4e 1.6.10; emacs 27.2 From: Christopher Baines To: bug-guile@gnu.org Subject: sleep return value error, with pselect6 system call on Linux Date: Sun, 09 Jan 2022 09:58:19 +0000 Message-ID: <877db9b505.fsf@cbaines.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=212.71.252.8; envelope-from=mail@cbaines.net; helo=mira.cbaines.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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. =E2=86=92 guix time-machine --commit=3Db603554ed044638dd40b6863d5dada59eefe= 03b8 -- environment --ad-hoc guile -- guile -c '(peek (sleep 5))' ;;; (0) select(4, [3], NULL, NULL, {tv_sec=3D5, tv_usec=3D0}) =3D 0 (Timeout) =E2=86=92 guix time-machine --commit=3D6dffced09ecda024e0884e352778c221ad06= 6fd6 -- environment --ad-hoc guile -- guile -c '(peek (sleep 5))' ;;; (5) pselect6(4, [3], NULL, NULL, {tv_sec=3D5, tv_nsec=3D0}, NULL) =3D 0 (Timeou= t)