NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/46248 CVS commit: src/sys
The following reply was made to PR kern/46248; it has been noted by GNATS.
From: "Jaromir Dolecek" <jdolecek%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/46248 CVS commit: src/sys
Date: Sun, 2 May 2021 19:13:43 +0000
Module Name: src
Committed By: jdolecek
Date: Sun May 2 19:13:43 UTC 2021
Modified Files:
src/sys/kern: kern_event.c
src/sys/sys: eventvar.h
Log Message:
implement fo_restart hook for kqueue descriptors, so that close(2)
on the descriptor won't block indefinitely if other thread is currently
blocked on the same kqueue in kevent(2)
done similarily to pipes and sockets, i.e. using flag on the potentially
shared kqueue structure hooked off file_t - this is somewhat suboptimal
if the application dup(2)ped the descriptor, but this should be rare
enough to not really matter
usually this causes the kevent(2) to end up returning EBADF since
on the syscall restart the descriptor is not there anymore; if
dup(2)ped the kevent(2) call can continue successfully if the closed
kqueue descriptor was other than the one used for the kevent(2)
call
PR kern/46248 by Julian Fagir
To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/kern/kern_event.c
cvs rdiff -u -r1.8 -r1.9 src/sys/sys/eventvar.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index