Skip to content

Commit c5ba8f2

Browse files
committed
Windows: no-op deleter for fd handle (IPC is Linux-only)
Made-with: Cursor
1 parent 740039e commit c5ba8f2

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

cuda_core/cuda/core/_cpp/resource_handles.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
#include <unordered_map>
1313
#include <vector>
1414

15-
#ifdef _WIN32
16-
#include <io.h>
17-
#else
15+
#ifndef _WIN32
1816
#include <unistd.h>
1917
#endif
2018

@@ -1130,9 +1128,7 @@ FileDescriptorHandle create_fd_handle(int fd) {
11301128
return FileDescriptorHandle(
11311129
new int(fd),
11321130
[](const int* p) {
1133-
#ifdef _WIN32
1134-
::_close(*p);
1135-
#else
1131+
#ifndef _WIN32
11361132
::close(*p);
11371133
#endif
11381134
delete p;

0 commit comments

Comments
 (0)