Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
5ac516c9
Commit
5ac516c9
authored
Aug 17, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
poll: deal with invalid file descriptors more like specified
parent
7bbd36a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
1 deletion
+26
-1
compat/poll.c
compat/poll.c
+26
-1
No files found.
compat/poll.c
View file @
5ac516c9
...
...
@@ -114,7 +114,32 @@ int (poll) (struct pollfd *fds, unsigned nfds, int timeout)
val
=
select
(
val
+
1
,
rdset
,
wrset
,
exset
,
(
timeout
>=
0
)
?
&
tv
:
NULL
);
if
(
val
==
-
1
)
return
-
1
;
{
#ifndef _WIN32
if
(
errno
!=
EBADF
)
#else
if
(
WSAGetLastError
()
!=
WSAENOTSOCK
)
#endif
return
-
1
;
val
=
0
;
for
(
unsigned
i
=
0
;
i
<
nfds
;
i
++
)
#ifndef _WIN32
if
(
fcntl
(
fds
[
i
].
fd
,
F_GETFD
)
==
-
1
)
#else
if
(
getsockopt
(
fds
[
i
].
fd
,
SOL_SOCKET
,
SO_REUSEADDR
,
&
(
DWORD
){
0
},
&
(
int
){
sizeof
(
DWORD
)
})
!=
0
)
#endif
{
fds
[
i
].
revents
=
POLLNVAL
;
val
++
;
}
else
fds
[
i
].
revents
=
0
;
return
val
?
val
:
-
1
;
}
for
(
unsigned
i
=
0
;
i
<
nfds
;
i
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment