Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
f951deec
Commit
f951deec
authored
Oct 20, 2009
by
Dmitriy Anisimkov
Committed by
Alexandre Julliard
Oct 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ws2_32: Ignore EINTR poll result code in WS_select.
parent
7fa618aa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
socket.c
dlls/ws2_32/socket.c
+27
-2
No files found.
dlls/ws2_32/socket.c
View file @
f951deec
...
@@ -2883,6 +2883,8 @@ int WINAPI WS_select(int nfds, WS_fd_set *ws_readfds,
...
@@ -2883,6 +2883,8 @@ int WINAPI WS_select(int nfds, WS_fd_set *ws_readfds,
const
struct
WS_timeval
*
ws_timeout
)
const
struct
WS_timeval
*
ws_timeout
)
{
{
struct
pollfd
*
pollfds
;
struct
pollfd
*
pollfds
;
struct
timeval
tv1
,
tv2
;
int
torig
=
0
;
int
count
,
ret
,
timeout
=
-
1
;
int
count
,
ret
,
timeout
=
-
1
;
TRACE
(
"read %p, write %p, excp %p timeout %p
\n
"
,
TRACE
(
"read %p, write %p, excp %p timeout %p
\n
"
,
...
@@ -2894,9 +2896,32 @@ int WINAPI WS_select(int nfds, WS_fd_set *ws_readfds,
...
@@ -2894,9 +2896,32 @@ int WINAPI WS_select(int nfds, WS_fd_set *ws_readfds,
return
SOCKET_ERROR
;
return
SOCKET_ERROR
;
}
}
if
(
ws_timeout
)
timeout
=
(
ws_timeout
->
tv_sec
*
1000
)
+
(
ws_timeout
->
tv_usec
+
999
)
/
1000
;
if
(
ws_timeout
)
{
torig
=
(
ws_timeout
->
tv_sec
*
1000
)
+
(
ws_timeout
->
tv_usec
+
999
)
/
1000
;
timeout
=
torig
;
gettimeofday
(
&
tv1
,
0
);
}
while
((
ret
=
poll
(
pollfds
,
count
,
timeout
))
<
0
)
{
if
(
errno
==
EINTR
)
{
if
(
!
ws_timeout
)
continue
;
gettimeofday
(
&
tv2
,
0
);
ret
=
poll
(
pollfds
,
count
,
timeout
);
tv2
.
tv_sec
-=
tv1
.
tv_sec
;
tv2
.
tv_usec
-=
tv1
.
tv_usec
;
if
(
tv2
.
tv_usec
<
0
)
{
tv2
.
tv_usec
+=
1000000
;
tv2
.
tv_sec
-=
1
;
}
timeout
=
torig
-
(
tv2
.
tv_sec
*
1000
)
-
(
tv2
.
tv_usec
+
999
)
/
1000
;
if
(
timeout
<=
0
)
break
;
}
else
break
;
}
release_poll_fds
(
ws_readfds
,
ws_writefds
,
ws_exceptfds
,
pollfds
);
release_poll_fds
(
ws_readfds
,
ws_writefds
,
ws_exceptfds
,
pollfds
);
if
(
ret
==
-
1
)
SetLastError
(
wsaErrno
());
if
(
ret
==
-
1
)
SetLastError
(
wsaErrno
());
...
...
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