Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
df67f268
Unverified
Commit
df67f268
authored
Jul 28, 2018
by
Kenton Varda
Committed by
GitHub
Jul 28, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #708 from ohwgiles/bugfix/checkexits-ignore-echild
Ignore ECHILD in UnixEventPort::ChildSet::checkExits
parents
00cd0c38
4c2796b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
async-unix-test.c++
c++/src/kj/async-unix-test.c++
+3
-5
async-unix.c++
c++/src/kj/async-unix.c++
+6
-1
No files found.
c++/src/kj/async-unix-test.c++
View file @
df67f268
...
...
@@ -707,12 +707,7 @@ TEST(AsyncUnixTest, ChildProcess) {
KJ_DEFER
(
KJ_SYSCALL
(
sigprocmask
(
SIG_SETMASK
,
&
oldsigs
,
nullptr
))
{
break
;
});
TestChild
child1
(
port
,
123
);
TestChild
child2
(
port
,
234
);
TestChild
child3
(
port
,
345
);
KJ_EXPECT
(
!
child1
.
promise
.
poll
(
waitScope
));
KJ_EXPECT
(
!
child2
.
promise
.
poll
(
waitScope
));
KJ_EXPECT
(
!
child3
.
promise
.
poll
(
waitScope
));
child1
.
kill
(
SIGTERM
);
...
...
@@ -722,6 +717,9 @@ TEST(AsyncUnixTest, ChildProcess) {
KJ_EXPECT
(
WEXITSTATUS
(
status
)
==
123
);
}
TestChild
child2
(
port
,
234
);
TestChild
child3
(
port
,
345
);
KJ_EXPECT
(
!
child2
.
promise
.
poll
(
waitScope
));
KJ_EXPECT
(
!
child3
.
promise
.
poll
(
waitScope
));
...
...
c++/src/kj/async-unix.c++
View file @
df67f268
...
...
@@ -145,7 +145,12 @@ void UnixEventPort::ChildSet::checkExits() {
for
(;;)
{
int
status
;
pid_t
pid
;
KJ_SYSCALL
(
pid
=
waitpid
(
-
1
,
&
status
,
WNOHANG
));
KJ_SYSCALL_HANDLE_ERRORS
(
pid
=
waitpid
(
-
1
,
&
status
,
WNOHANG
))
{
case
ECHILD
:
return
;
default
:
KJ_FAIL_SYSCALL
(
"waitpid()"
,
error
);
}
if
(
pid
==
0
)
break
;
auto
iter
=
waiters
.
find
(
pid
);
...
...
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