Compatibility with POSIX.1

The following functions are compatible with POSIX.1:

Process Primitives (Section 3)

fork, execl, execle, execlp, execv, execve, execvp, wait, waitpid, _exit, kill, sigemptyset, sigfillset, sigaddset, sigdelset, sigismember, sigaction, pthread_sigmask, sigprocmask, sigpending, sigsuspend, alarm, pause, sleep

Process Environment (Section 4)

getpid, getppid, getuid, geteuid, getgid, getegid, setuid, setgid, getgroups, getlogin, getpgrp, setsid, setpgid, uname, time, times, getenv, ctermid, ttyname, isatty, sysconf

Files and Directories (Section 5)

opendir, readdir, rewinddir, closedir, chdir, getcwd, open, creat, umask, link, mkdir, unlink, rmdir, rename, stat, fstat, access, chmod, fchmod, chown, utime, ftruncate, pathconf, fpathconf

Input and Output Primitives (Section 6)

pipe, dup, dup2, close, read, write, fcntl, lseek, fsync

Device- and Class-Specific Functions (Section 7)

cfgetispeed, cfgetospeed, cfsetispeed, cfsetospeed, tcdrain, tcflow, tcflush, tcgetattr, tcgetpgrp, tcsendbreak, tcsetattr, tcsetpgrp

Language-Specific Services for the C Programming Language (Section 8)

abort, exit, fclose, fdopen, fflush, fgetc, fgets, fileno, fopen, fprintf, fputc, fputs, fread, freopen, fscanf, fseek, ftell, fwrite, getc, getchar, gets, perror, printf, putc, putchar, puts, remove, rewind, scanf, setlocale, siglongjmp, sigsetjmp, tmpfile, tmpnam, tzset

System Databases (Section 9)

getgrgid, getgrnam, getpwnam, getpwuid

Memory Management (Section 12)

mmap, mprotect, msync, munmap

Implementation Details

setuid and setgid always return ENOSYS.

link will copy the file if it can't implement a true symbolic link. Currently, symbolic links work, if at all, only under Windows NT.

chown always returns zero.

fcntl doesn't support F_GETLK - it returns -1 and sets errno to ENOSYS.

lseek only works properly on binary files.