Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This fails on a Mac (10.9) and on CENTOS5 (2.6.18):

    #include <unistd.h>
    #include <fcntl.h>
    #include <stdio.h>

    int main()
    {
        int fd = creat("foo/bar", 1);
        if (fd == -1) {
            printf("error\n");
        } else {
            close(fd);
        }
        return 0;
    }




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: