It actually *does *work (again, there's a unit test as well as working code 
for five years now), but good to know that it is actually useless, so this 
is something to remove as part of the usual maintenance chores.

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

On Fri, Dec 15, 2023 at 7:13 AM 'TheDiveO' via golang-nuts <
golan...@googlegroups.com> wrote:

I'm opening both named pipe ends as follows (in different processes):

os.OpenFile(fifoname, os.O_WRONLY, os.ModeNamedPipe)
os.OpenFile(fifoname, os.O_RDONLY, os.ModeNamedPipe)


Passing  os.ModeNamedPipe to os.OpenFile doesn't make any sense unless the 
open is creating the named pipe by also including os.O_CREATE and it's not 
clear doing so is even valid (I haven't tested whether it works). You can't 
force a file to behave like a named pipe by passing that value to the 
os.OpenFile function and that flag isn't needed to open an existing named 
pipe. The os.ModeNamedPipe constant is meant to be used when testing the 
file mode returned by os.Stat. You would normally use the unix.Mkfifo 
function to create a named pipe.

-- 
Kurtis Rader
Caretaker of the exceptional canines Junior and Hank

-- 
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/dea55bb6-c962-4614-8ebe-21220ff8efc9n%40googlegroups.com.

Reply via email to