lkml.org 
[lkml]   [1998]   [Jan]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PROPOSAL: /proc/dev
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

Michael Chastain
<mailto:mec@shout.net>
"love without fear"

\
 
 \ /
  Last update: 2005-03-22 13:41    [W:0.070 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site