Qian Yun
unread,Apr 29, 2026, 8:35:01 AM (2 days ago) Apr 29Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to fricas-devel
If we use FriCAS inside a pipe, and does not take all of its output,
such as:
echo '1+1' | fricas -nosman | head -n 4
Then we will be sent to debugger:
debugger invoked on a SB-INT:BROKEN-PIPE in thread
#<THREAD tid=847801 "main thread" RUNNING {1200038003}>:
Couldn't write to #<SB-SYS:FD-STREAM for "standard output" {12010AC3E3}>:
Broken pipe
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit from the current thread.
(SB-IMPL::FLUSH-OUTPUT-BUFFER #<SB-SYS:FD-STREAM for "standard output"
{12010AC3E3}>)
=====
What's the right thing to do here? Terminate the whole process
on SIGPIPE?
To achieve, we can use
(sb-sys:enable-interrupt sb-unix:sigpipe :default)
in "fricas_init".
- Qian