| Index: base/process/kill_posix.cc
|
| diff --git a/base/process/kill_posix.cc b/base/process/kill_posix.cc
|
| index 99d70d9ab5590418566be37a047a6aa67ee58247..80f5996c4cebf78b46dba79fda141812db53ec44 100644
|
| --- a/base/process/kill_posix.cc
|
| +++ b/base/process/kill_posix.cc
|
| @@ -273,16 +273,15 @@ static bool WaitForSingleNonChildProcess(ProcessHandle handle,
|
| DCHECK_GT(handle, 0);
|
| DCHECK(wait.InMilliseconds() == base::kNoTimeout || wait > base::TimeDelta());
|
|
|
| - int kq = kqueue();
|
| - if (kq == -1) {
|
| + ScopedFD kq(kqueue());
|
| + if (!kq) {
|
| DPLOG(ERROR) << "kqueue";
|
| return false;
|
| }
|
| - file_util::ScopedFD kq_closer(&kq);
|
|
|
| struct kevent change = {0};
|
| EV_SET(&change, handle, EVFILT_PROC, EV_ADD, NOTE_EXIT, 0, NULL);
|
| - int result = HANDLE_EINTR(kevent(kq, &change, 1, NULL, 0, NULL));
|
| + int result = HANDLE_EINTR(kevent(kq.get(), &change, 1, NULL, 0, NULL));
|
| if (result == -1) {
|
| if (errno == ESRCH) {
|
| // If the process wasn't found, it must be dead.
|
| @@ -316,7 +315,7 @@ static bool WaitForSingleNonChildProcess(ProcessHandle handle,
|
| remaining_timespec_ptr = &remaining_timespec;
|
| }
|
|
|
| - result = kevent(kq, NULL, 0, &event, 1, remaining_timespec_ptr);
|
| + result = kevent(kq.get(), NULL, 0, &event, 1, remaining_timespec_ptr);
|
|
|
| if (result == -1 && errno == EINTR) {
|
| if (!wait_forever) {
|
|
|