Skip to content

Commit

Permalink
Merging r354029:
Browse files Browse the repository at this point in the history
------------------------------------------------------------------------
r354029 | mgorny | 2019-02-14 14:52:31 +0100 (Thu, 14 Feb 2019) | 7 lines

[lldb] [MainLoop] Report errno for failed kevent()

Modify the kevent() error reporting to use errno rather than returning
the return value.  At least on FreeBSD and NetBSD, kevent() always
returns -1 in case of error, and the actual error is returned via errno.

Differential Revision: https://reviews.llvm.org/D58229
------------------------------------------------------------------------

llvm-svn: 354254
  • Loading branch information
zmodem committed Feb 18, 2019
1 parent 46fbca3 commit 096ef4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lldb/source/Host/common/MainLoop.cpp
Expand Up @@ -109,7 +109,7 @@ Status MainLoop::RunImpl::Poll() {
out_events, llvm::array_lengthof(out_events), nullptr);

if (num_events < 0)
return Status("kevent() failed with error %d\n", num_events);
return Status(errno, eErrorTypePOSIX);
return Status();
}

Expand Down

0 comments on commit 096ef4c

Please sign in to comment.