bug#62691: Calling system* in the module body hangs Guile, while calling open-pipe* does not

Михаил Бахтерев <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <CACx33gjEaHWynrRhC9SKMDGc+iRNkXQc3MKYoBn_QaJH4zevBQ@mail.gmail.com>
Greetings! I've hit the following issue.

1. $ guile --version
guile (GNU Guile) 3.0.9

2.  uname -a
Linux ein 6.2.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 30 Mar 2023 14:51:14
+0000 x86_64 GNU/Linux

3. $ pacman -Qi guile
Name            : guile
Version         : 3.0.9-1
Description     : Portable, embeddable Scheme implementation written in C
Architecture    : x86_64

4. When loading (i am not sure about the stage) module which contains in
the body system* call Guile hangs on futex operation. The code to reproduce
the behavior.

$ cat a.scm
(add-to-load-path ".")
(import (b))
(display "hello world from SCM!")
(newline)

$ cat b.scm
(define-module (b))
(system* "echo" "hello world from SYS!")

$ guile a.scm
HANGS HERE!

But if system* is changed to open-pipe*, like so:
$ cat b.scm
(define-module (b) #:use-module (ice-9 popen))
(close-pipe (open-pipe* OPEN_WRITE "echo" "hello world from SYS!"))

everything seems ok:
$ guile a.scm
hello world from SYS!
Hello World from SCM!

- MB, with best regards.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.