Commit ada86f48 authored by Mart Lubbers's avatar Mart Lubbers

Merge branch '88-pipes-broken-on-macos-when-using-pseudo-ttys' of...

Merge branch '88-pipes-broken-on-macos-when-using-pseudo-ttys' of gitlab.science.ru.nl:clean-and-itasks/clean-platform into 88-pipes-broken-on-macos-when-using-pseudo-ttys
parents 5dbfcdba f524289c
Pipeline #41948 passed with stage
in 2 minutes and 7 seconds
......@@ -354,8 +354,10 @@ callProcess path args mCurrentDirectory world
readPipeNonBlocking :: !ReadPipe !*World -> (!MaybeOSError String, !*World)
readPipeNonBlocking (ReadPipe fd) world
# timeout = writeInt (writeInt (malloc 16) 0 0) 8 0
# (res, world) = readSelect [fd] timeout world
# (timeout, world) = mallocSt 16 world
# timeout = writeInt (writeInt timeout 0 0) 8 0
# ((res, world), timeout) = readP (\ptr->readSelect [fd] ptr world) timeout
# world = freeSt timeout world
| isError res = (liftError res, world)
| and (fromOk res) = realRead fd world
= (Ok "", world)
......@@ -397,8 +399,8 @@ readSelect fds timeout world
# readfds = seq [\ptr -> writeIntElemOffset ptr i 0 \\ i <- [0..IF_INT_64_OR_32 15 31]] readfds
# readfds = seq [setFdBit fd\\fd<-fds] readfds
# (res, world) = select_ (maximum fds + 1) readfds 0 0 timeout world
| res == -1 = getLastOSError world
# res = [getFdBit fd readfds\\fd<-fds]
| res == -1 = getLastOSError (freeSt readfds world)
# (res, readfds) = seqList [readP (getFdBit fd)\\fd<-fds] readfds
# world = freeSt readfds world
= (Ok res, world)
where
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment