The reason this is a FIFO is that you can have 'named pipes' in UNIX where the file is connected directly to a process that can read or write to it. Some people use this to make their finger information cycle dynamically each time they are fingered, or to do a 'back finger' to work out who fingered them. However, there are more modern finger daemons that can run scripts directly so that particular application is less common.

The reason that a directory like fifo would be useful is to allow access to a program through a file system like interface. This would allow some funky stuff to occur. So you could map a DB directly to some filesystem layout so that reads and writes would access the DB (I think Oracle has something like this). Or you could have a filesystem that automatically version controlled files that were stored in it (e.g. Clearcase). Or you could present a dynamic view of processes running & use the OS permissions structures to controll access (e.g. the proc filesystem). Or make a directory that was mapped to a different site using FTP or HTTP. Or to store the files encrypted on disk and automatically show the desrypted version once the program has been run with the appropriate arguments.

Unfortunately there is no easy way to do this. There are some things you can do under Linux to allow a program to act as a filesystem (userfs) but that is pretty hard core. And you would probably have to write a layer in C that would map the lower level stuff up into Perl.

Tye's idea of using nfs to do this is pretty cunning and is used by some encryption filesystems. NFS basically takes a filesytem request and shoves it over the network to a program (typically nfsd) running on some remote host. The standard nfsd maps this to a local file system operation. You might be able to find an nfsd that allows you to hook into it and override the operations. Then if you run it on the same host, you can mount some arbitrary directory against your hacked nfsd and present whatever virtual view of the world that you want.

Good luck.

-ben


In reply to Re: FIFO directory? by knobunc
in thread FIFO directory? by lindex

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.