FreeBSD Bugzilla – Attachment 221549 Details for
Bug 252582
Linuxulator: epoll create drop user data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
epoll test code
file_252582.txt (text/plain), 619 bytes, created by
shu
on 2021-01-14 03:29:14 UTC
(
hide
)
Description:
epoll test code
Filename:
MIME Type:
Creator:
shu
Created:
2021-01-14 03:29:14 UTC
Size:
619 bytes
patch
obsolete
>#include <stdio.h> >#include <string.h> >#include <unistd.h> > >#include <sys/epoll.h> >#include <sys/types.h> >#include <sys/socket.h> > >#define MAX 64 > >int >main() >{ > int efd, num, i; > struct epoll_event ev, evs[MAX]; > > efd = epoll_create(MAX); > > dup2(socket(AF_INET, SOCK_DGRAM, 0), 16); > > memset(&ev, 0, sizeof(ev)); > ev.events = EPOLLOUT | EPOLLET; > ev.data.fd = -1; > epoll_ctl(efd, EPOLL_CTL_ADD, 16, &ev); > > epoll_create(MAX); > > num = epoll_wait(efd, evs, MAX, -1); > for(i = 0; i < num; i++) { > printf("fd 16 origin data -1, now:%d\n", evs[i].data.fd); > } > > close(efd); > return 0; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 252582
:
221464
|
221465
|
221517
| 221549