unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: 48565@debbugs.gnu.org
Subject: bug#48565: Using move->fdes to move stdin to 9 + interrupt (C-c) exits guile
Date: Fri, 21 May 2021 14:59:44 +0200	[thread overview]
Message-ID: <2acd3e1e839f74a1f0915011c6a0edbb0c235bc8.camel@telenet.be> (raw)

[-- Attachment #1: Type: text/plain, Size: 999 bytes --]

user@hostname ~$ guile
GNU Guile 3.0.5
Copyright (C) 1995-2021 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guile-user)> blabla [C-c C-c]
While reading expression:
User interrupt
scheme@(guile-user)> (move->fdes (fdes->inport 0) 9)
$1 = #<input: file /dev/pts/8>
scheme@(guile-user)> [C-c C-C]
user@hostname ~$

What I expected:
While reading expression:
User interrupt

Your file descriptor may vary.

My suspicion: look at libguile/scmsigs.c (start_signal_delivery_thread),
in particular:

  if (pipe2 (signal_pipe, O_CLOEXEC) != 0)
    scm_syserror (NULL);

signal_pipe[0] and signal_pipe[1] don't seem to be added to the
port table, so primitive-move->fdes does not know about the signal pipes
and will silently overwrite them.

Greetings,
Maxime

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

                 reply	other threads:[~2021-05-21 12:59 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=2acd3e1e839f74a1f0915011c6a0edbb0c235bc8.camel@telenet.be \
    --to=maximedevos@telenet.be \
    --cc=48565@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).