vendredi 18 septembre 2026 à 19:13, [email protected]
a écrit :
Can you try to create a minimal example program? I wouldn't be
surprised if there is a bug in the process port implementation,
but having a working example would help me a lot debugging this.
Hi, thank you very much.
Here is the minimal example program:
(import (chicken io)
(chicken process))
(let* ((fuzzel-proc
(process "fuzzel" '("--dmenu" "--log-level" "info")))
(fuzzel-stdin (process-input-port fuzzel-proc))
(fuzzel-stdout (process-output-port fuzzel-proc)))
(let loop ((payload '("test\x00;icon\x1f;firefox"
"toto\x00;icon\x1f;password")))
(unless (null? payload)
(write-line (car payload) fuzzel-stdin)
(loop (cdr payload))))
(close-input-port fuzzel-stdin)
(let ((answer (read-line fuzzel-stdout)))
(close-output-port fuzzel-stdout)
(receive (process-wait fuzzel-proc))
(display answer)))
You need to have fuzzel installed on your machine (and firefox for
the icons). If saved in a "test.scm" file, you can run it as
csi -s test.scm
Normally, when started it should display firefox icons next to
"test" and "toto" label.
The interesting thing with the "info" log level, is that you’ll
notice in the console that log stops when the menu open. Once you
select an entry, the menu closes, and in the log you’ll see a new
line appearing like "info: main.c:632: theme: default". This line
is normally sent by the main fuzzel procedure while building the
menu itself. See:
https://codeberg.org/dnkl/fuzzel/src/branch/master/main.c#L632
In this kind of call, menu lines are read from stdin just a few
lines above in the same function:
https://codeberg.org/dnkl/fuzzel/src/branch/master/main.c#L609
Hence my feeling that something is frozen until the
"read" happen and "liberate" the process, allowing fuzzel to
continue to the icon loading part… but the menu has already
disapeared.
Thanks again for your help to let me understand what happen!
--
Étienne Pflieger
https://etienne.pflieger.bzh