#pragma lib
[m6w6/ext-psi] / tests / pipe / pipe.psi
index 24c572381125c9108179c84c99f1c521c222e33c..8bc0f8ee40f497df6c5450cde9bcaa5fa2c2f9d3 100644 (file)
@@ -1,8 +1,9 @@
+#pragma lib "crypt";
 
-// extern int pipe(int fildes[2]);
+#include <unistd.h>
 
 function \pipe(array &$fds = null) : int {
-       return to_int(pipe);
-       let fildes = calloc(2, psi\SIZEOF_INT);
-       set $fds = to_array(fildes[2]);
+       return pipe(fildes) as to_int(pipe);
+       let fildes = calloc(2, sizeof(int));
+       set $fds = to_array(*fildes, 2, to_int(*fildes));
 }