lkml.org 
[lkml]   [1998]   [Jan]   [5]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 6 Jan 1998 00:24:49 +1100
FromRichard Gooch <>
SubjectRe: PROPOSAL: /proc/dev
Michael Elizabeth Chastain writes:
> Hi Richard et al,> > > You could specify with dev_register() that when a device/inode is opened,
> > the ownership should be set to the process that opened it "first". When
> > the device is closed for the last time (before someone else uses the
> > pty at a later time), the ownership reverts back to the default.> > Yes, you could do this in the devfs layer.  But you could also add
> "last close" hooks to the existing code.
> 
> > BTW: These automatic ownership changes wouldn't be preserved across
> > reboots via the boot/shutdown mechanism.
> 
> What about this use case:
> 
>     user opens device
>     hourly cron job snapshots owners and modes in /dev
>     system crashes
>     system reboots
>     init-job restores owners and modes in /dev

Good point. Yeah, you probably really want open_pty() instead. But, as
I said, this is a separate issue. Writing devfs is not about fixing
pty creation, but better management of *all* devices. And ptys are
somewhat different than other devices in Unix: they are not really
shared resources, in general. It's probably about time someone threw
away pty devices and implemented open_pty(). Any takers ;-)

				Regards,

					Richard....
\
 
 \ /
  Last update: 2005-03-22 12:41    [from the cache]
©2003-2008