unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
* bug#48565: Using move->fdes to move stdin to 9 + interrupt (C-c) exits guile
@ 2021-05-21 12:59 Maxime Devos
  0 siblings, 0 replies; only message in thread
From: Maxime Devos @ 2021-05-21 12:59 UTC (permalink / raw)
  To: 48565

[-- 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 --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-21 12:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 12:59 bug#48565: Using move->fdes to move stdin to 9 + interrupt (C-c) exits guile Maxime Devos

unofficial mirror of bug-guile@gnu.org 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhetil.org/guile-bugs/0 guile-bugs/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guile-bugs guile-bugs/ https://yhetil.org/guile-bugs \
		bug-guile@gnu.org
	public-inbox-index guile-bugs

Example config snippet for mirrors.
Newsgroups are available over NNTP:
	nntp://news.yhetil.org/yhetil.lisp.guile.bugs
	nntp://news.gmane.io/gmane.lisp.guile.bugs


AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git