diff --git a/library/unix/io.factor b/library/unix/io.factor index a7d0f32a14..5ba5735f65 100644 --- a/library/unix/io.factor +++ b/library/unix/io.factor @@ -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