named pipes

From: Steve Swinnea <swinnea_at_weiss.che.utexas.edu>
Date: Fri, 30 Jun 1995 08:31:22 -0500

I asked recently about removing svr4 named pipes from the filesystem
once processes were through using them. "rm PIPE" didn't work.

My original message:
    I've been working with a program suite that sets up a named pipe
    (/var/spool/ppr/PIPE). I abandoned the pipe mechanism in libc.a in
    favor on the one in libsrv4.a. The program works now except when I
    kill it the pipe remains. If I try rm, I get the message "Device
    busy". The problem is that I can't restart the program at this point
    because the program can no longer open a pipe with the old one there.
    Rebooting clears the p flag on the file and then the program can be
    restarted.

Jim Wright <jwright_at_phy.ucsf.edu> wrote:
    this is an ugly answer, but in case you don't get any
    prettier ones...

    % program
    % kill <program>
    % mv PIPE PIPE.1
    % mknod p PIPE
    % program
    % kill <program>
    % mv PIPE PIPE.2
    etc...

    then on reboot, have it "rm /var/spool/ppr/PIPE.*" to clean up.


ron menner <rtm_at_zk3.dec.com> wrote:
    i'm sorry to say that you have to do an umount on the named
    pipe before rm will work. Again my sincere apolgies for
    this behaviour.


This occurred to me shortly after I posted the message. I did a
df and it complained about the filesystem /var/spool/ppr/PIPE. I
suppose having to use the FFS option in the kernel should have
given me a clue. Oh, well it works. :(

Steve Swinnea
swinnea_at_che.utexas.edu
Department of Chemical Engineering
The University of Texas at Austin
Received on Fri Jun 30 1995 - 16:23:14 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT