File tree Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Expand file tree Collapse file tree 1 file changed +4
-12
lines changed Original file line number Diff line number Diff line change @@ -117,8 +117,6 @@ else:
117
117
when defined (windows):
118
118
import winlean
119
119
else :
120
- when defined (linux):
121
- import linux
122
120
import posix
123
121
124
122
type
@@ -333,16 +331,10 @@ else:
333
331
334
332
proc createPipe * (size = 65536 , register = true ): AsyncPipe =
335
333
var fds: array [2 , cint ]
336
- when defined (linux):
337
- # pipe2 syscall was added in 2.6.27, it allows to create atomically set
338
- # the O_NONBLOCK flag.
339
- if linux.pipe2 (fds, O_NONBLOCK ) == - 1 :
340
- raiseOSError (osLastError ())
341
- else :
342
- if posix.pipe (fds) == - 1 :
343
- raiseOSError (osLastError ())
344
- setNonBlocking (fds[0 ])
345
- setNonBlocking (fds[1 ])
334
+ if posix.pipe (fds) == - 1 :
335
+ raiseOSError (osLastError ())
336
+ setNonBlocking (fds[0 ])
337
+ setNonBlocking (fds[1 ])
346
338
347
339
result = AsyncPipe (readPipe: fds[0 ], writePipe: fds[1 ])
348
340
You can’t perform that action at this time.
0 commit comments