]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/unix/users/users.factor
continuations[-docs]: add the finally word
[factor.git] / basis / unix / users / users.factor
index ee2e592c1f452b0da224939534178bdb2d14e8bd..7b77eebefeb8debeb073189e6d5be67d5a7e44f9 100644 (file)
@@ -32,7 +32,7 @@ M: unix passwd>new-passwd ( passwd -- seq )
 
 : with-pwent ( quot -- )
     setpwent
-    [ unix.ffi:endpwent ] [ ] cleanup ; inline
+    [ unix.ffi:endpwent ] finally ; inline
 
 PRIVATE>
 
@@ -94,7 +94,7 @@ GENERIC: set-effective-user ( string/id -- )
 : (with-real-user) ( string/id quot -- )
     '[ _ set-real-user @ ]
     real-user-id '[ _ set-real-user ]
-    [ ] cleanup ; inline
+    finally ; inline
 
 : with-real-user ( string/id/f quot -- )
     over [ (with-real-user) ] [ nip call ] if ; inline
@@ -102,7 +102,7 @@ GENERIC: set-effective-user ( string/id -- )
 : (with-effective-user) ( string/id quot -- )
     '[ _ set-effective-user @ ]
     effective-user-id '[ _ set-effective-user ]
-    [ ] cleanup ; inline
+    finally ; inline
 
 : with-effective-user ( string/id/f quot -- )
     over [ (with-effective-user) ] [ nip call ] if ; inline