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
56f4262e
Commit
56f4262e
authored
Aug 17, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Aug 21, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt/tests: Wait for spawned processes to finish.
parent
1e5b131d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
file.c
dlls/msvcrt/tests/file.c
+9
-2
No files found.
dlls/msvcrt/tests/file.c
View file @
56f4262e
...
...
@@ -34,6 +34,8 @@
#include <process.h>
#include <errno.h>
static
HANDLE
proc_handles
[
2
];
static
void
test_fdopen
(
void
)
{
static
const
char
buffer
[]
=
{
0
,
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
};
...
...
@@ -922,7 +924,7 @@ static void test_pipes(const char* selfname)
arg_v
[
3
]
=
str_fdr
;
sprintf
(
str_fdr
,
"%d"
,
pipes
[
0
]);
arg_v
[
4
]
=
str_fdw
;
sprintf
(
str_fdw
,
"%d"
,
pipes
[
1
]);
arg_v
[
5
]
=
NULL
;
_spawnvp
(
_P_NOWAIT
,
selfname
,
arg_v
);
proc_handles
[
0
]
=
(
HANDLE
)
_spawnvp
(
_P_NOWAIT
,
selfname
,
arg_v
);
ok
(
close
(
pipes
[
1
])
==
0
,
"unable to close %d: %d
\n
"
,
pipes
[
1
],
errno
);
r
=
read
(
pipes
[
0
],
buf
,
sizeof
(
buf
)
-
1
);
...
...
@@ -947,7 +949,7 @@ static void test_pipes(const char* selfname)
arg_v
[
3
]
=
str_fdr
;
sprintf
(
str_fdr
,
"%d"
,
pipes
[
0
]);
arg_v
[
4
]
=
str_fdw
;
sprintf
(
str_fdw
,
"%d"
,
pipes
[
1
]);
arg_v
[
5
]
=
NULL
;
_spawnvp
(
_P_NOWAIT
,
selfname
,
arg_v
);
proc_handles
[
1
]
=
(
HANDLE
)
_spawnvp
(
_P_NOWAIT
,
selfname
,
arg_v
);
ok
(
close
(
pipes
[
1
])
==
0
,
"unable to close %d: %d
\n
"
,
pipes
[
1
],
errno
);
file
=
fdopen
(
pipes
[
0
],
"r"
);
...
...
@@ -1004,4 +1006,9 @@ START_TEST(file)
test_get_osfhandle
();
test_setmaxstdio
();
test_pipes
(
arg_v
[
0
]);
/* Wait for the (_P_NOWAIT) spawned processes to finish to make sure the report
* file contains lines in the correct order
*/
WaitForMultipleObjects
(
sizeof
(
proc_handles
)
/
sizeof
(
proc_handles
[
0
]),
proc_handles
,
TRUE
,
5000
);
}
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