Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 1995 09:10:21 +0200 (SAT)
From:      John Hay <jhay@mikom.csir.co.za>
To:        vince@apollo.COSC.GOV (-Vince-)
Cc:        FreeBSD-hackers@freefall.freebsd.org
Subject:   Re: Masterplan 1.00 (fwd)
Message-ID:  <199509220710.JAA10372@zibbi.mikom.csir.co.za>
In-Reply-To: <Pine.BSF.3.91.950921235313.19640S-100000@apollo.COSC.GOV> from "-Vince-" at Sep 21, 95 11:53:59 pm

next in thread | previous in thread | raw e-mail | index | archive | help
> 
> On Thu, 14 Sep 1995, John Hay wrote:
> 
> Hi John and everyone,
> 
> > > 	I am attempting to get masterplan working under FreeBSD but have 
> > > been unsuccessful so I emailed the author and was told that FreeBSD 
> > > doesn't allow named pipes to be created.  Can anyone confirm this and 
> > > know what I can do to get masterplan working?  Thanks..
> > > 
> > It is just called something else. mkfifo
> 
> 	Oh okay but is there really anything different about mknod and mkfifo?
> 
Well I'm not sure, not having used it on other machines that have mknod. Here
is a piece of a program that create the fifo and open the read side.

        if (mkfifo(pipe_pathname, (mode_t)(S_IREAD | S_IWRITE)) == -1)
                if (errno != EEXIST)
                        return errno;

        /*
         * Open `read' end of the pipe.
         * (The probe daemon will open the `write' end shortly.)
         */
        if ((probe_rdport = open(pipe_pathname, O_RDONLY | O_NDELAY)) == -1)
                return errno;

And here is the piece that open it for writing:
        /* open `write' end of pipe */
        if ((pipe_wrport = open(argv[1], O_WRONLY | O_NDELAY)) == -1) {
                syslog(LOG_CRIT, "Cannot open write end of pipe: %m");
                terminate();
        }

I hope this helps.

John
-- 
John Hay -- John.Hay@csir.co.za



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199509220710.JAA10372>