diff --git a/src/AutoRemoteSyscalls.cc b/src/AutoRemoteSyscalls.cc index c0a37554ffb..53052a6dcd6 100644 --- a/src/AutoRemoteSyscalls.cc +++ b/src/AutoRemoteSyscalls.cc @@ -691,6 +691,10 @@ template ScopedFd AutoRemoteSyscalls::retrieve_fd_arch(int fd) { if (ret.is_open()) { return ret; } + if (errno == EBADF) { + // This can happen when the child was unexpectedly killed. + return ret; + } ASSERT(t, errno == ENOSYS) << "Failed in pidfd_getfd errno=" << errno_name(errno); }