devfs
[Top] [All Lists]

Re: when do stdout, stdin, and stderr get created?

To: Richard Gooch <rgooch@xxxxxxxxxxxxxxx>
Subject: Re: when do stdout, stdin, and stderr get created?
From: Russell Coker <russell@xxxxxxxxxxxx>
Date: Sun, 11 Nov 2001 02:27:23 +0100
Cc: devfs@xxxxxxxxxxx
In-reply-to: <200111101711.fAAHBIq16761@vindaloo.ras.ucalgary.ca>
References: <20011109211241.4F88D18E5@lyta.coker.com.au> <20011110104930.62A1F34DA9@lyta.coker.com.au> <200111101711.fAAHBIq16761@vindaloo.ras.ucalgary.ca>
Reply-to: Russell Coker <russell@xxxxxxxxxxxx>
Sender: owner-devfs@xxxxxxxxxxx
On Sat, 10 Nov 2001 18:11, Richard Gooch wrote:
> > > > Currently on boot I see the following messages from devfsd:
> > > > error lstat(2)ing: "stdin"      No such file or directory
> > > > error lstat(2)ing: "stdout"     No such file or directory
> > > > error lstat(2)ing: "stderr"     No such file or directory
> > > >
> > > > Where are these links created?  Why are they created in the early
> > > > boot process?  Why not just have devfsd create them (or one of the
> > > > boot scripts)?
> > >
> > > Those links are created by devfsd (as is "fd") early in it's
> > > initialisation phase. But the message is wrong, it's a call to stat(2)
> > > that is failing, not lstat(2). I don't get these messages.
> > >
> > > Hm. Is /proc mounted at this time?
> >
> > No.  On Debian devfs is started before the "checkroot" script (which
> > mounts /proc).
> >
> > I'm looking into getting this changed.
>
> Well, this shouldn't be necessary. I've already fixed the message to
> reflect that it's stat(2) that's failing and not lstat(2). I'm
> considering making the PERMISSIONS action ignore symlinks. Right now,
> you can change permissions by going through a symlink. That would no
> longer be possible. For example:
> REGISTER   discs/disc.*/disc   PERMISSIONS   0.0   rw-r-----
>
> would no longer change the permissions of all whole-disc
> entries. However, you could get the same effect with:
> REGISTER   .*/disc   PERMISSIONS   0.0   rw-r-----
>
> since no non-disc driver should create a "disc" leaf node. Otherwise,
> you'd need something like:
> REGISTER   scsi/.*/disc   PERMISSIONS   0.0   rw-r-----
> REGISTER    ide/.*/disc   PERMISSIONS   0.0   rw-r-----
>
> Comments?

This sounds good.  Now can I count on all whole-disk entries to match in 
/disc$ and all partitions to match /part[0-9]+$ and nothing to give a false 
match?  Currently I have separate entries for IDE and SCSI and have been 
contemplating adding new entries for RAID controllers etc.

> BTW: what config line do you have that wants to change the permissions
> of "stdin", "stdout" and "stderr" anyway?

Nothing any more.

Once I made a mistake in a config file which matched ^st as SCSI tapes and 
changed stdin/stdout/stderr to mode 600 which for some reason I could not 
determine resulted in /dev getting mode 600 and the system being mostly 
unusable.  The strange thing was that it didn't happen at initial start, only 
on signal 1.

-- 
http://www.coker.com.au/bonnie++/     Bonnie++ hard drive benchmark
http://www.coker.com.au/postal/       Postal SMTP/POP benchmark
http://www.coker.com.au/projects.html Projects I am working on
http://www.coker.com.au/~russell/     My home page

<Prev in Thread] Current Thread [Next in Thread>