On Mon, 10 Feb 2003 16:14:24 -0500 (EST) Net Llama! <[EMAIL PROTECTED]> wrote:
> On Mon, 10 Feb 2003, Condon Thomas A KPWA wrote: > > Net Llama! <mailto:[EMAIL PROTECTED]> typed thusly on Monday, > > February 10, 2003 12:40 PM: > > > > > On Mon, 10 Feb 2003, David A. Bandel wrote: > > >> Remember all those daemons running on your system? Some > > >> of them need the information provided by these files and > > >> these daemons have no "environment". So where will they > > >> get the right info from? > > >> > > >> Since the info doesn't change, I suggest you get the > > >> address and name during bootup and put the correct info > > >> in the file. > > > > > > Unfortunately, its not quite that simple. > > > > Couldn't you set up the environmental variable in the > > /etc/rc.d/rc.sysinit file (or whatever file is executed first by > > init reading /etc/inittab) and export it. It would then be > > available to *all* of the daemons that init kicked off, as well as > > later applications. It would also be modifiable, too, wouldn't it? > > According to Dave Bandel, that wouldn't work. when you EXPORT a variable, it's available to CHILD processes, not PARENT processes. So the KERNEL, which runs init, would have to have that variable set (which it can't) in order for init to have it. Since init has no exported variables, its CHILDREN have none. init runs rc.sysinit, but as soon as rc.sysinit exits, the exports are gone and init knows nothing about them. Think about it for a while, you really want this to be the way things work. Because if you could assign a changeable environment to init, _anyone_ could change the environment and do as they pleased. UNIX has seen its share of faux paux like this in the kernel (thankfully, those have long since been removed). If I understood more of what Lonnie needs to do, there might be a way, but he's been rather cryptic about it so it must be a secret. Ciao, David A. Bandel -- Focus on the dream, not the competition. Nemesis Racing Team motto
msg12058/pgp00000.pgp
Description: PGP signature
_______________________________________________ Linux-users mailing list [EMAIL PROTECTED] Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users
