Please note that the unit test I linked to tests on the "writing end" of 
the pipe. In fact, I wrote in the OP right in my first sentence:

> *Hi, I need to detect on the producer side (writing end) of a named pipe 
when the consumer (reading end) has disconnect/closed. *

I'm afraid, but you are not reproducing the situation I was asking for and 
provided a unit test for.

On Sunday, December 17, 2023 at 6:16:45 AM UTC+1 Kurtis Rader wrote:

I should probably clarify that my copy of TheDiveO code simply added the 
following function and replaced the use of github.com/sirupsen/logrus with 
println.

func main() {
        f, err := os.OpenFile("p", os.O_RDONLY, 0)
        if err != nil {
                println("open p", err.Error())
                os.Exit(1)
        }
        println("fifo opened")
        WaitTillBreak(f)
}


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/badca3c7-f532-4bf2-8f0d-3085eeb77aa4n%40googlegroups.com.

Reply via email to