]> gitweb.factorcode.org Git - factor.git/commitdiff
port stream-close didn't close the fd
authorSlava Pestov <slava@factorcode.org>
Thu, 23 Jun 2005 20:00:26 +0000 (20:00 +0000)
committerSlava Pestov <slava@factorcode.org>
Thu, 23 Jun 2005 20:00:26 +0000 (20:00 +0000)
library/unix/io.factor

index a7d0f32a1471b172e6ecdc31b83c0988600904ee..5ba5735f65d6359adcdb5a8a309610d7d914847f 100644 (file)
@@ -306,7 +306,9 @@ M: port stream-write-attr ( string style writer -- )
     nip >r dup string? [ ch>string ] unless r> blocking-write ;
 
 M: port stream-close ( stream -- )
-    dup stream-flush delegate [ buffer-free ] when* ;
+    dup stream-flush
+    dup port-handle close
+    delegate [ buffer-free ] when* ;
 
 ! Make a duplex stream for reading/writing a pair of fds