[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: stat() and its consequences (was: Re: Strange behavior while copying files)



Neal H Walfield <neal@cs.uml.edu> writes:

> >   2. The translators created files in / when started. IIRC,
> >      translators should be started with a current directory which is
> >      the place where they were installed in the file system. Creating
> >      files with non-relative names from a translator doesn't seem like

[ ooops, there's a gratious negation in this sentence /nisse ]

> >      a bad thing to be doing (although there certainly are some
> >      exceptions).
> 
> False.  This is impossible because we never know where the cwd of a
> translator will be; this is up to the underlying filesystem.

Can you elaborate on this? In one sense, the cwd can be anywhere (for
instance, if you install an active translator with settrans). But for
translators that are started automatically by the filesystem, there
ought to be some conventions, and one convention ought to specify that
the cwd of the translator process should be the directory in which the
translator was installed.

As an example, say that I have a translator installed as /dev/foo, and
when started, it also wants to translate some related node /dev/bar.
In this case, I think it is inappropriate for the translator to refer
to the other node as "/dev/bar", it would be better for it to refer to
the node with the relative filename "bar", and rely on it being
started with a sensible cwd. That way, I can install the translator at
"/somewhere/else", and have it automatically create the related node
under "/somewhere/bar", without interfering with the first tranlator's
nodes /dev/foo and /dev/bar.

Of course there are exceptions. One may want to provide an explicit
absolute filename on the translator's command line. Or one may want
the translator to interact with nodes with "well known" absolute names
(I think the latter is the case with pfinet). But using absolute
filenames should not be the normal way of doing things.

Am I making any sense to you?

Regards,
/Niels

PS. When thinking some more, I realize that I don't know if a
    translator is installed on an inode or on a filename. But in any
    case, as startup of translators happens at open time, it should
    still make sense to talk about "the directory in which the
    translator setting was found").

PPS: Why are you addressing mail to Niels@walfield.org,
     M@walfield.org, rather than to nisse@lysator.liu.se?



Reply to: