about summary refs log tree commit diff stats
path: root/src/io
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-13 21:17:29 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-13 21:20:00 +0100
commit4e690f150c8e3e2a54661f7a5cbdf7df40718c73 (patch)
tree2eb420a9374fed69cbbd2ce1a62cf385738a81a8 /src/io
parent0bc67b7bc1476a27961476f0d42f7af8c21e2933 (diff)
downloadchawan-4e690f150c8e3e2a54661f7a5cbdf7df40718c73.tar.gz
loader: fix delOutput bug, remove ErrorWouldBlock
Diffstat (limited to 'src/io')
-rw-r--r--src/io/posixstream.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/io/posixstream.nim b/src/io/posixstream.nim
index 1b615dce..3aa14191 100644
--- a/src/io/posixstream.nim
+++ b/src/io/posixstream.nim
@@ -8,7 +8,6 @@ type
     isend*: bool
 
   ErrorAgain* = object of IOError
-  ErrorWouldBlock* = object of IOError
   ErrorBadFD* = object of IOError
   ErrorFault* = object of IOError
   ErrorInterrupted* = object of IOError
@@ -19,10 +18,8 @@ type
 proc raisePosixIOError*() =
   # In the nim stdlib, these are only constants on linux amd64, so we
   # can't use a switch.
-  if errno == EAGAIN:
+  if errno == EAGAIN or errno == EWOULDBLOCK:
     raise newException(ErrorAgain, "eagain")
-  elif errno == EWOULDBLOCK:
-    raise newException(ErrorWouldBlock, "would block")
   elif errno == EBADF:
     raise newException(ErrorBadFD, "bad fd")
   elif errno == EFAULT: