Re: Access named pipe in Windows XP
- From: David Gravereaux <davygrvy@xxxxxxxxx>
- Date: Fri, 30 Dec 2005 14:43:53 -0800
On Fri, 30 Dec 2005 11:41:44 -0500, "Jim" <donotreply@xxxxxxxxxxx>
wrote:
>I know this question came up before, but I don't see a clear answer to it.
>
>I want to write to a named pipe from my script, but the "open" function
>below doesn't seem to work.
>
>set p [open "\\\\.\\Pipe\\my_test_pipe" w]
>
>However, the open function in Perl works just fine:
>open(p, "> \\\\.\\Pipe\\my_test_pipe")
>
>Could anybody shed any light on this?
>
>TIA,
>Jim
>
>
There isn't a channel driver specifically for namedpipes. But there
could be if someone coded one up.
A named pipe is a bidirectional handle, but the pipe channel driver
assumes a pair of unidirectional ones for the anonymous type.
I tried once putting the same handle in both, but there's a double
destroy when you do.
IIRC, there isn't any easy way to determine from the HANDLE what type
of pipe it is.
See win/tclWinChan.c:Tcl_MakeFileChannel(). I don't know if there is
a determinate way to tell the difference between anon and named for
the FILE_TYPE_PIPE case.
Please experiment. Please post patches :)
.
- References:
- Access named pipe in Windows XP
- From: Jim
- Access named pipe in Windows XP
- Prev by Date: Re: Tcl vs. Lua
- Next by Date: Re: Jim Gettys on writing software for the new "one laptop per child" system
- Previous by thread: Access named pipe in Windows XP
- Next by thread: Re: Access named pipe in Windows XP
- Index(es):
Relevant Pages
|