Adding open(2) interface.

This commit is contained in:
Alex Shinn 2012-01-11 00:03:57 +09:00
parent 8e6927001c
commit f77366f1ad
2 changed files with 5 additions and 1 deletions

View file

@ -11,7 +11,7 @@
close-file-descriptor renumber-file-descriptor
delete-file link-file symbolic-link-file rename-file
directory-files directory-fold create-directory delete-directory
open-pipe make-fifo
open open-pipe make-fifo
file-status
file-device file-inode
file-mode file-num-links

View file

@ -135,6 +135,10 @@
(define-c errno (close-file-descriptor "close") (int))
;;> Opens the given file and returns a file descriptor.
(define-c int open (string int (default #o644 int)))
;;> Returns a list of 2 new file descriptors, the input and
;;> output end of a new pipe, respectively.