* Re: embedded udev-81 doesn't remove node when fd open
@ 2011-04-22 22:34 John Ervin
2011-04-22 22:47 ` Greg KH
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: John Ervin @ 2011-04-22 22:34 UTC (permalink / raw)
To: linux-hotplug
Hello,
Using udev-81 in an embedded system with 2.6.21 kernel (later versions
of udev don't compile b/c of glibc version with cross compilation
tools). I need to keep the file descriptor of the device (a usb serial
device) open to receive asynchronous data.
But, if the device is removed while the fd is open, udev doesn't
remove the node. Any way to configure things so that udev removes the
node, even while the fd is held open by user space program(s)?
John Ervin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: embedded udev-81 doesn't remove node when fd open
2011-04-22 22:34 embedded udev-81 doesn't remove node when fd open John Ervin
@ 2011-04-22 22:47 ` Greg KH
2011-04-22 23:03 ` John Ervin
2011-04-22 23:17 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2011-04-22 22:47 UTC (permalink / raw)
To: linux-hotplug
On Fri, Apr 22, 2011 at 03:34:52PM -0700, John Ervin wrote:
> Hello,
>
> Using udev-81 in an embedded system with 2.6.21 kernel (later versions
> of udev don't compile b/c of glibc version with cross compilation
> tools).
Wow, you do realize just how old both of those releases are, right? If
you are stuck on those releases, then I suggest you get support from the
vendors or people who are forcing those versions on you, there's not
much we can do about it here, right?
> I need to keep the file descriptor of the device (a usb serial
> device) open to receive asynchronous data.
>
> But, if the device is removed while the fd is open, udev doesn't
> remove the node. Any way to configure things so that udev removes the
> node, even while the fd is held open by user space program(s)?
That's because the device node is not gone, the kernel still sees it
being open, so it has not released it.
udev isn't involved here at all, so there's nothing it can do, it is
never notified of anything because nothing has changed in the kernel
yet.
Note, we did "help" this out in future kernel versions by sending a
HANGUP signal to userspace when the device went away, and you would get
that fix for free by updating to a newer kernel.
best of luck,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: embedded udev-81 doesn't remove node when fd open
2011-04-22 22:34 embedded udev-81 doesn't remove node when fd open John Ervin
2011-04-22 22:47 ` Greg KH
@ 2011-04-22 23:03 ` John Ervin
2011-04-22 23:17 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: John Ervin @ 2011-04-22 23:03 UTC (permalink / raw)
To: linux-hotplug
> Note, we did "help" this out in future kernel versions by sending a
> HANGUP signal to userspace when the device went away, and you would get
> that fix for free by updating to a newer kernel.
Greg,
Happen to recall the earliest this was implemented, ie kernel with
appropriate udev/rev?
John Ervin
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: embedded udev-81 doesn't remove node when fd open
2011-04-22 22:34 embedded udev-81 doesn't remove node when fd open John Ervin
2011-04-22 22:47 ` Greg KH
2011-04-22 23:03 ` John Ervin
@ 2011-04-22 23:17 ` Greg KH
2 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2011-04-22 23:17 UTC (permalink / raw)
To: linux-hotplug
On Fri, Apr 22, 2011 at 04:03:00PM -0700, John Ervin wrote:
> > Note, we did "help" this out in future kernel versions by sending a
> > HANGUP signal to userspace when the device went away, and you would get
> > that fix for free by updating to a newer kernel.
>
> Greg,
>
> Happen to recall the earliest this was implemented, ie kernel with
> appropriate udev/rev?
Again, it's not a udev issue, it was a kernel change.
And no, sorry, I don't, again, it was years ago, which was a few hundred
thousand changes ago, sorry.
git is your friend, it should be trivial to dig it up if you really want
it. Go make the people forcing you to stick with obsolete software do
it for you :)
good luck,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-22 23:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-22 22:34 embedded udev-81 doesn't remove node when fd open John Ervin
2011-04-22 22:47 ` Greg KH
2011-04-22 23:03 ` John Ervin
2011-04-22 23:17 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).