You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is how I run into this problem: In main(), I started notification on FIFO /dev/pigpio0 and forked another process which runs pig2vcd to output the captured waveform. But I found that in the child process, I can't close /dev/pigpio0 even if I called gpioNotifyClose.
After going through the source code I found that by default, the actual close is done in the alert thread, but fork() only copies the main thread. I read the man page and found that this problem can be fixed by including O_CLOEXEC when calling open(). Will you consider adding this flag when opening FIFOs?
The text was updated successfully, but these errors were encountered:
Hi there! Thanks for your awesome project!
This is how I run into this problem: In
main()
, I started notification on FIFO/dev/pigpio0
and forked another process which runspig2vcd
to output the captured waveform. But I found that in the child process, I can't close/dev/pigpio0
even if I calledgpioNotifyClose
.After going through the source code I found that by default, the actual close is done in the alert thread, but
fork()
only copies the main thread. I read the man page and found that this problem can be fixed by includingO_CLOEXEC
when callingopen()
. Will you consider adding this flag when opening FIFOs?The text was updated successfully, but these errors were encountered: