Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
7f74824d
Commit
7f74824d
authored
Dec 26, 2000
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed error recovery during thread creation.
parent
e5557b35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
7 deletions
+12
-7
process.c
server/process.c
+3
-4
thread.c
server/thread.c
+9
-3
No files found.
server/process.c
View file @
7f74824d
...
@@ -178,13 +178,12 @@ struct thread *create_process( int fd )
...
@@ -178,13 +178,12 @@ struct thread *create_process( int fd )
if
((
process
->
next
=
first_process
)
!=
NULL
)
process
->
next
->
prev
=
process
;
if
((
process
->
next
=
first_process
)
!=
NULL
)
process
->
next
->
prev
=
process
;
first_process
=
process
;
first_process
=
process
;
/* create the main thread */
if
(
!
(
thread
=
create_thread
(
fd
,
process
)))
goto
error
;
/* create the init done event */
/* create the init done event */
if
(
!
(
process
->
init_event
=
create_event
(
NULL
,
0
,
1
,
0
)))
goto
error
;
if
(
!
(
process
->
init_event
=
create_event
(
NULL
,
0
,
1
,
0
)))
goto
error
;
add_process_thread
(
process
,
thread
);
/* create the main thread */
if
(
!
(
thread
=
create_thread
(
fd
,
process
)))
goto
error
;
release_object
(
process
);
release_object
(
process
);
return
thread
;
return
thread
;
...
...
server/thread.c
View file @
7f74824d
...
@@ -91,7 +91,11 @@ static int alloc_client_buffer( struct thread *thread )
...
@@ -91,7 +91,11 @@ static int alloc_client_buffer( struct thread *thread )
struct
get_thread_buffer_request
*
req
;
struct
get_thread_buffer_request
*
req
;
int
fd
,
fd_pipe
[
2
];
int
fd
,
fd_pipe
[
2
];
if
(
pipe
(
fd_pipe
)
==
-
1
)
return
-
1
;
if
(
pipe
(
fd_pipe
)
==
-
1
)
{
file_set_error
();
return
0
;
}
if
((
fd
=
create_anonymous_file
())
==
-
1
)
goto
error
;
if
((
fd
=
create_anonymous_file
())
==
-
1
)
goto
error
;
if
(
ftruncate
(
fd
,
MAX_REQUEST_LENGTH
)
==
-
1
)
goto
error
;
if
(
ftruncate
(
fd
,
MAX_REQUEST_LENGTH
)
==
-
1
)
goto
error
;
if
((
thread
->
buffer
=
mmap
(
0
,
MAX_REQUEST_LENGTH
,
PROT_READ
|
PROT_WRITE
,
if
((
thread
->
buffer
=
mmap
(
0
,
MAX_REQUEST_LENGTH
,
PROT_READ
|
PROT_WRITE
,
...
@@ -106,6 +110,9 @@ static int alloc_client_buffer( struct thread *thread )
...
@@ -106,6 +110,9 @@ static int alloc_client_buffer( struct thread *thread )
req
->
boot
=
(
thread
==
booting_thread
);
req
->
boot
=
(
thread
==
booting_thread
);
req
->
version
=
SERVER_PROTOCOL_VERSION
;
req
->
version
=
SERVER_PROTOCOL_VERSION
;
/* add it here since send_client_fd may call kill_thread */
add_process_thread
(
thread
->
process
,
thread
);
send_client_fd
(
thread
,
fd_pipe
[
0
],
-
1
);
send_client_fd
(
thread
,
fd_pipe
[
0
],
-
1
);
send_client_fd
(
thread
,
fd
,
-
1
);
send_client_fd
(
thread
,
fd
,
-
1
);
send_reply
(
thread
);
send_reply
(
thread
);
...
@@ -695,10 +702,9 @@ DECL_HANDLER(new_thread)
...
@@ -695,10 +702,9 @@ DECL_HANDLER(new_thread)
send_client_fd
(
current
,
sock
[
1
],
req
->
handle
);
send_client_fd
(
current
,
sock
[
1
],
req
->
handle
);
close
(
sock
[
1
]
);
close
(
sock
[
1
]
);
/* thread object will be released when the thread gets killed */
/* thread object will be released when the thread gets killed */
add_process_thread
(
current
->
process
,
thread
);
return
;
return
;
}
}
release_object
(
thread
);
kill_thread
(
thread
,
1
);
}
}
close
(
sock
[
1
]
);
close
(
sock
[
1
]
);
}
}
...
...
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