kern/147604: kqueue timer events are not deleted when associated

看板FB_bugs作者時間15年前 (2010/06/07 08:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
>Number: 147604 >Category: kern >Synopsis: kqueue timer events are not deleted when associated descriptor is closed >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jun 07 00:10:02 UTC 2010 >Closed-Date: >Last-Modified: >Originator: James Bailie >Release: FreeBSD 8.1-PRERELEASE amd64 >Organization: >Environment: System: FreeBSD localhost 8.1-PRERELEASE FreeBSD 8.1-PRERELEASE #20: Sat May 29 13:36:02 EDT 2010 root@localhost:/usr/obj/usr/src/sys/LOCAL amd64 >Description: Timer events set with kevent() do not get deleted when the associated descriptor is closed. If this behavior is intentional, then the manual page should be modified to reflect this. >How-To-Repeat: --- test.c begins here --- #include <sys/types.h> #include <sys/event.h> #include <sys/time.h> #include <stdlib.h> #include <stdio.h> #include <errno.h> int main( int argc, char **argv ) { struct kevent inqueue[ 1 ], outqueue[ 1 ]; int kq, inq; if (( kq = kqueue()) < 0 ) { fprintf( stderr, "kqueue(): %s", strerror( errno )); exit( 1 ); } inqueue[ 0 ].ident = 0; inqueue[ 0 ].filter = EVFILT_TIMER; inqueue[ 0 ].fflags = 0; inqueue[ 0 ].data = 1000; inqueue[ 0 ].flags = EV_ADD | EV_ENABLE; inqueue[ 0 ].udata = NULL; for( inq = 1; ; inq = 0 ) { if ( kevent( kq, inqueue, inq, outqueue, 1, NULL ) > 0 && outqueue[ 0 ].filter == EVFILT_TIMER ) { write( 1, "TIMEOUT\n", 8 ); if ( inq ) close( 0 ); } } } --- test.c ends here --- >Fix: >Release-Note: >Audit-Trail: >Unformatted: _______________________________________________ freebsd-bugs@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-bugs To unsubscribe, send any mail to "freebsd-bugs-unsubscribe@freebsd.org"
文章代碼(AID): #1C33u305 (FB_bugs)