[Top][All Lists]

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

what info are translators given?

From: mike burrell
Subject: what info are translators given?
Date: Sat, 22 Dec 2001 19:49:25 -0700
User-agent: Mutt/1.2.5i

this is more a question to those with some experience with making
translators and whatnot (hi Marcus).

do translators get any information about the processes that are trying to
access their goodies?

as an example, there was something on a Linux "wishlist" a while back which
proposed "dynamic" symlinks which would change according to environment
variables.  e.g. pretend /bin was a symlink which looked like:
        /bin -> /$HOSTTYPE/bin
obviously with normal symlink behaviour, this wouldn't work at all.  but
with "magic" symlink behaviour, it would look at the environment variables
of the process which dereferenced it, and expand accordingly.  e.g. i could
log in from one machine and it would point to /i586/bin, or log in from
another machine and point to /sparc/bin.

if one were to implement this with a translator, the translator would have
to know the environment variables of the process which is trying to access
it, NOT the environment variables of the translator itself.

is there a mechanism to do this?

i came about this while thinking about my HTTP translator actually :).  e.g.
when using HTTP, you might get a different document depending on your
HTTP_REFERER or whatever.  but if i want my HTTP translator to give out
documents based on a simple
"/.../http/" type format, then
there's no room for things like HTTP_REFERER, and an obvious solution would
be to use environment variables.  but how do you "pass" environment
variables to the translator if you're just doing a simple open()?


 /"\                                                 m i k e   b u r r e l l
 \ /     ASCII RIBBON CAMPAIGN                      
 / \      AND NEWS TOO, dammit

reply via email to

[Prev in Thread] Current Thread [Next in Thread]