devpts wrapup

Greg Schafer gschafer at zip.com.au
Sun Sep 21 20:48:31 PDT 2003


On Mon, Sep 22, 2003 at 12:33:22PM +1000, Greg Schafer wrote:
> On Mon, Sep 22, 2003 at 11:06:12AM +1000, Greg Schafer wrote:
> > So guess what? Houston, we have a problem.
> > 
> > In the case of the user who has an incorrect devpts or devfs setup, glibc
> > tries to fall back to using "pt_chown" but it doesn't work coz the
> > installation of pt_chown is bogus due to the above failure.
> > 
> > Does anyone buy this theory?
> > 
> > Sigh, s'pose I'll just have to test it out, dammit.. :-(
> 
> Scratch that... in testing I cannot make it work :-(
> 
> Doesn't get as far as calling pt_chown..
> 
> Maybe the glibc docs are outdated or the fallback code is buggy, dunno.
> Stracing sheds a few clues but I can't crack it.
> 
> If anyone wants the quick test case, executing
> 
> expect -c "spawn /bin/ls"
> 
> triggers it when devpts is not mounted.
> 
> (not sure whether that is correct expect syntax or not)

Actually, DON'T scratch that! My theory was correct after all!  :-)

Where I was going wrong was, this test partition's /dev files were created
with:

  ./MAKEDEV -v generic-nopty

therefore I was missing /dev/ptyp0 and /dev/ttyp0 and friends. Strace showed
me they were missing. I pulled out mknod and quickly made a few of those
files then pt_chown was getting called. I changed the permissions on
pt_chown then voila! everything started working! :-)

Pheeewwwwww. After all that. I think I finally understand all the issues
well enough to put some sane text in the book so as to avoid this whole
problem for unsuspecting folks new to test suites.

Greg



More information about the lfs-dev mailing list