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
5d4a9617
Commit
5d4a9617
authored
Sep 24, 2015
by
Michael Müller
Committed by
Alexandre Julliard
Oct 01, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineconsole: Forward child process exitcode.
Signed-off-by:
Michael Müller
<
michael@fds-team.de
>
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
parent
0425c0eb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
winecon_private.h
programs/wineconsole/winecon_private.h
+1
-0
wineconsole.c
programs/wineconsole/wineconsole.c
+14
-3
No files found.
programs/wineconsole/winecon_private.h
View file @
5d4a9617
...
...
@@ -59,6 +59,7 @@ struct inner_data {
HANDLE
hConIn
;
/* console input handle */
HANDLE
hConOut
;
/* screen buffer handle: has to be changed when active sb changes */
HANDLE
hSynchro
;
/* waitable handle signalled by server when something in server has been modified */
HANDLE
hProcess
;
/* handle to the child process or NULL */
HWND
hWnd
;
/* handle of 'user' window or NULL for 'curses' */
INT
nCmdShow
;
/* argument of WinMain */
BOOL
in_set_config
;
/* to handle re-entrant calls to WINECON_SetConfig */
...
...
programs/wineconsole/wineconsole.c
View file @
5d4a9617
...
...
@@ -541,6 +541,7 @@ static void WINECON_Delete(struct inner_data* data)
if
(
data
->
hConIn
)
CloseHandle
(
data
->
hConIn
);
if
(
data
->
hConOut
)
CloseHandle
(
data
->
hConOut
);
if
(
data
->
hSynchro
)
CloseHandle
(
data
->
hSynchro
);
if
(
data
->
hProcess
)
CloseHandle
(
data
->
hProcess
);
HeapFree
(
GetProcessHeap
(),
0
,
data
->
curcfg
.
registry
);
HeapFree
(
GetProcessHeap
(),
0
,
data
->
cells
);
HeapFree
(
GetProcessHeap
(),
0
,
data
);
...
...
@@ -749,7 +750,7 @@ static int WINECON_Spawn(struct inner_data* data, LPWSTR cmdLine)
done
=
CreateProcessW
(
NULL
,
cmdLine
,
NULL
,
NULL
,
TRUE
,
0L
,
NULL
,
NULL
,
&
startup
,
&
info
);
if
(
done
)
{
CloseHandle
(
info
.
hProcess
)
;
data
->
hProcess
=
info
.
hProcess
;
CloseHandle
(
info
.
hThread
);
}
...
...
@@ -892,8 +893,18 @@ int PASCAL WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, INT nCmdSh
if
(
!
ret
)
{
WINE_TRACE
(
"calling MainLoop.
\n
"
);
ret
=
data
->
fnMainLoop
(
data
);
DWORD
exitcode
;
WINE_TRACE
(
"calling MainLoop.
\n
"
);
ret
=
data
->
fnMainLoop
(
data
);
if
(
!
ret
&&
data
->
hProcess
&&
WaitForSingleObject
(
data
->
hProcess
,
INFINITE
)
==
WAIT_OBJECT_0
&&
GetExitCodeProcess
(
data
->
hProcess
,
&
exitcode
))
{
WINE_TRACE
(
"forwarding exitcode %u from child process
\n
"
,
exitcode
);
ret
=
exitcode
;
}
}
WINECON_Delete
(
data
);
...
...
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