mirror of
https://github.com/ohwgiles/laminar.git
synced 2024-10-27 20:34:20 +00:00
give capnp ownership of process output fd
this fixes an intermittent issue (race condition?) where the IoContext attempts to poll an already-closed fd
This commit is contained in:
parent
668ada74d1
commit
3068180f8e
@ -518,7 +518,6 @@ void Laminar::reapAdvance() {
|
||||
std::shared_ptr<Run> run = *it;
|
||||
bool completed = true;
|
||||
activeJobs.get<0>().modify(it, [&](std::shared_ptr<Run> run){
|
||||
close(run->fd);
|
||||
run->reaped(ret);
|
||||
completed = stepRun(run);
|
||||
});
|
||||
|
@ -389,7 +389,7 @@ void Server::stop() {
|
||||
}
|
||||
|
||||
void Server::addDescriptor(int fd, std::function<void(char*,size_t)> cb) {
|
||||
auto event = this->ioContext.lowLevelProvider->wrapInputFd(fd);
|
||||
auto event = this->ioContext.lowLevelProvider->wrapInputFd(fd, kj::LowLevelAsyncIoProvider::TAKE_OWNERSHIP);
|
||||
tasks.add(handleFdRead(event, cb).attach(std::move(event)));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user