[lug] named pipe missunderstanding

jeffrey.haemer at gmail.com jeffrey.haemer at gmail.com
Wed Feb 2 18:01:55 MST 2011


*Caveat Programmor* (let the programmer beware):

FIFOs (named pipes) are POSIX IPCs that live in the filesystem name space
and have standardized semantics.

However, they're creations of the kernel, which owns and manages the data.
 If you create one in a filesystem that's NFS-mounted, and assume you can
use it to communicate with a process on another machine, you are asking for
trouble.

I have asked for trouble like this before, and reliably found some. :-)

Probably not the cause of the problem under discussion, but worth a mention
while we're on this topic.

On Wed, Feb 2, 2011 at 4:13 PM, Lori Reed <lorireed at lightning-rose.com>wrote:

>
> My apologies. It's been a while since I used pipes. popen(3) is for
> un-named pipes.
>
> Named pipes are created before use by either the mknod(1) or mkfifo(1)
> shell commands, or the mknod(2,3) and mkfifo(3) function calls.
>
> Before running your Java code did you run the mkfifo command in the
> shell? If not, that may be the source of your trouble.
>
> http://linux.die.net/man/1/mkfifo
> http://linux.die.net/man/3/mkfifo
>
> Lori
>
>
> On 02/02/2011 02:23 PM, Jason Davis wrote:
> > http://developers.sun.com/solaris/articles/named_pipes.html
> >
> > Opening a Named Pipe
> >
> > A named pipe can be opened for reading or writing, and it is handled
> > just like any other normal file in the system. For example, a named
> > pipe can be opened by using the open() system call, or by using the
> > fopen() standard C library function.
> >
> > As with normal files, if the call succeeds, you will get a file
> > descriptor in the case of open(), or a 'FILE' structure pointer in the
> > case of fopen(), which you may use either for reading or for writing,
> > depending on the parameters passed to open() or to fopen().
> >
> > Therefore, from a user's point of view, once you have created the
> > named pipe, you can treat it as a file so far as the operations for
> > opening, reading, writing, and deleting are concerned.
> >
> >
> >
> > Hope someone tells the solaris developers...
> >
> >
> > On Wed, Feb 2, 2011 at 2:17 PM, Lori Reed<lorireed at lightning-rose.com>
>  wrote:
> >> On 02/02/2011 02:08 PM, Jason Davis wrote:
> >>
> >>> Seems to work fine if I keep the connection open. Writing and reading
> >>> work as expected. I dont plan on trying to seek() or do other file
> >>> operations. What exactly can I not rely on?
> >>
> >> It working.
> >>
> >> L.
> >> _______________________________________________
> >> Web Page:  http://lug.boulder.co.us
> >> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> >> Join us on IRC: irc.hackingsociety.org port=6667
> channel=#hackingsociety
> >>
> > _______________________________________________
> > Web Page:  http://lug.boulder.co.us
> > Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> > Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
> >
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: irc.hackingsociety.org port=6667 channel=#hackingsociety
>



-- 
Jeffrey Haemer <jeffrey.haemer at gmail.com>
720-837-8908 [cell], http://seejeffrun.blogspot.com [blog],
http://www.youtube.com/user/goyishekop [vlog]
פרייהייט? דאס איז יאַנג דינען וואָרט.
*
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20110202/67ee4af3/attachment.html>


More information about the LUG mailing list