Fix passing fd across modules

This commit is contained in:
Cheng Zhao 2016-05-19 16:38:37 +09:00
parent 4702d8b640
commit e609a5bee2
4 changed files with 58 additions and 6 deletions

19
atom/node/osfhandle.cc Normal file
View file

@ -0,0 +1,19 @@
// Copyright (c) 2016 GitHub, Inc.
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.
#include "osfhandle.h"
#include <io.h>
namespace node {
int open_osfhandle(intptr_t osfhandle, int flags) {
return _open_osfhandle(osfhandle, flags);
}
int close(int fd) {
return _close(fd);
}
} // namespace node