IRC channel logs

2024-10-20.log

back to list of logs

<drazisil>How do I file a bug at https://notabug.org/guile-lzlib/guile-lzlib if I don't have an account?
<drazisil>Or, asked diffently, if all the `make check` tests fail fot guile-lzlib, how would I troubleshoot that?
<graywolf>Hello :) I am curious how to handle sigpipe in guile. Is pthread_sigmask available under some name in guile?
<lampilelo>graywolf: use can use sigaction, e.g. (sigaction SIGPIPE SIG_IGN)
<graywolf>I admit I am not too sure how signals work, but I hoped it is possible to ignore it just for a single thread...
<lampilelo>if you call sigaction without passing a handler it will return the old handler, so you can wrap it with your new handler that dispatch on thread
<lampilelo>afaik the default action for SIGPIPE is to abort
<graywolf>Hm, can can I tell what thread was supposed to receive the signal though? Afaik the signal is just a number and does not have an adress associated with it. So I would not be able to tell when I want to do nothing (since I want to ignore it for thread T) and when to abort (for all other threads)
<graywolf>how can I*
<lampilelo>graywolf: i'm not really sure myself, but seems like when you install a handler for a signal on a thread, the signal will be ignored on other threads, also, by default, the signal handler runs on the thread you installed it on
<lampilelo>wait, it won't be ignored, when you raise that signal from another thread, the handler will run on the thread you installed it on
<lampilelo>unless the thread is dead, then nothing happens
<lampilelo>it's usually safe to just ignore SIGPIPE though
<graywolf>That (ignoring it) is what I am trying to do, but I am writing a library, so I would like to avoid changing global state
<graywolf>Ok so https://paste.debian.net/1332840/ seems to work. If I call (block-sigpipe) from the new thread, only that one thread will ignore the sigpipe.
<ArneBab>rlb: thank you for tackling string-improvements! Strings are one area where Python usually wins over Guile, even though Guile is faster in most other areas I saw.
<ekaitz>civodul: do you have a second?
<ekaitz>hi!
<ekaitz>civodul: (case thing (a 1) (b 2) (c 3)) fails to compile
<ekaitz>civodul: instead if I use 'a 'b and 'c it works, but it complains with a warning
<ekaitz>civodul: it was missing some extra parenthesis: (case thing ((a) 1) ((b) 2) ((c) 3))
<rlb>ArneBab: happy to, and interesting -- didn't know that (wrt comparison with python).