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
f2616a24
Commit
f2616a24
authored
May 20, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set only the client socket in non-blocking mode instead of all fds;
should avoid problems with stdio handles.
parent
e39b676a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
select.c
server/select.c
+0
-5
socket.c
server/socket.c
+5
-0
No files found.
server/select.c
View file @
f2616a24
...
@@ -6,7 +6,6 @@
...
@@ -6,7 +6,6 @@
#include <assert.h>
#include <assert.h>
#include <errno.h>
#include <errno.h>
#include <fcntl.h>
#include <signal.h>
#include <signal.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
...
@@ -37,12 +36,8 @@ static struct timeout_user *timeout_tail; /* sorted timeouts list tail */
...
@@ -37,12 +36,8 @@ static struct timeout_user *timeout_tail; /* sorted timeouts list tail */
/* register a user */
/* register a user */
void
register_select_user
(
struct
select_user
*
user
)
void
register_select_user
(
struct
select_user
*
user
)
{
{
int
flags
;
assert
(
!
users
[
user
->
fd
]
);
assert
(
!
users
[
user
->
fd
]
);
flags
=
fcntl
(
user
->
fd
,
F_GETFL
,
0
);
fcntl
(
user
->
fd
,
F_SETFL
,
flags
|
O_NONBLOCK
);
users
[
user
->
fd
]
=
user
;
users
[
user
->
fd
]
=
user
;
if
(
user
->
fd
>
max_fd
)
max_fd
=
user
->
fd
;
if
(
user
->
fd
>
max_fd
)
max_fd
=
user
->
fd
;
nb_users
++
;
nb_users
++
;
...
...
server/socket.c
View file @
f2616a24
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
#include <assert.h>
#include <assert.h>
#include <errno.h>
#include <errno.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdarg.h>
...
@@ -287,9 +288,13 @@ static void client_event( int event, void *private )
...
@@ -287,9 +288,13 @@ static void client_event( int event, void *private )
/* add a client */
/* add a client */
struct
client
*
add_client
(
int
fd
,
struct
thread
*
self
)
struct
client
*
add_client
(
int
fd
,
struct
thread
*
self
)
{
{
int
flags
;
struct
client
*
client
=
mem_alloc
(
sizeof
(
*
client
)
);
struct
client
*
client
=
mem_alloc
(
sizeof
(
*
client
)
);
if
(
!
client
)
return
NULL
;
if
(
!
client
)
return
NULL
;
flags
=
fcntl
(
fd
,
F_GETFL
,
0
);
fcntl
(
fd
,
F_SETFL
,
flags
|
O_NONBLOCK
);
client
->
state
=
RUNNING
;
client
->
state
=
RUNNING
;
client
->
select
.
fd
=
fd
;
client
->
select
.
fd
=
fd
;
client
->
select
.
func
=
client_event
;
client
->
select
.
func
=
client_event
;
...
...
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