]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/io/files/unix/unix.factor
Make unix-system-call retry the call immediately upon hitting EINTR. Use unix-system...
[factor.git] / basis / io / files / unix / unix.factor
index 9518d1c754366e135344ad1c181c03984a3e29ec..783e40a70cef5c6bb2e04651fbfbd454a687f4b3 100644 (file)
@@ -6,7 +6,8 @@ destructors system ;
 IN: io.files.unix
 
 M: unix cwd ( -- path )
-    MAXPATHLEN [ <byte-array> ] keep getcwd
+    MAXPATHLEN [ <byte-array> ] keep
+    [ getcwd ] unix-system-call
     [ (io-error) ] unless* ;
 
 M: unix cd ( path -- ) [ chdir ] unix-system-call drop ;
@@ -33,7 +34,7 @@ M: unix (file-writer) ( path -- stream )
 : open-append ( path -- fd )
     [
         append-flags file-mode open-file |dispose
-        dup 0 SEEK_END lseek io-error
+        dup 0 SEEK_END [ lseek ] unix-system-call io-error
     ] with-destructors ;
 
 M: unix (file-appender) ( path -- stream )