This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Cleanup of pty code


On Thu, 17 Sep 1998 23:56:02 +0200 (CEST), Mark Kettenis wrote:
>Hi,
>
>I have cleaned up the pty code.  There are some changes that make the
>code more robust (I had some problems with the old `grantpt'
>implementation.  It assumed that if the user was OK, everything else
>was too, which generally is was not the case.  It tries to set the
>owner group and access permissions itself before calling the helper
>program).  There are also some changes that make the code work better
>with new kernels (> 2.1.115) with the `devpts' filesystem.  `grantpt'
>now checks if the slave lives on a `devpts' filesystem.  If so it
>doesn't do anything (assuming that the `devpts' has been set up
>right).  Otherwise it falls back on the old method.

The patch looks good to me by eye, but I haven't tried it.  One thing:  I
think checking whether the pty has been set up right by looking for the
`devpts' filesystem is a bit shaky.  devfs sets up the pty automatically
too, and other implementations might do the same.  What was wrong with
checking the output of stat()?

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]