# 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, pthread_kill, pthread_sigmask

## 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

## Synchronization (Section 11)

sem_init, sem_destroy, sem_wait, sem_trywait, sem_post, pthread_mutex_init, pthread_mutex_destroy, pthread_mutex_lock, pthread_mutex_trylock, pthread_mutex_unlock

## Memory Management (Section 12)

mmap, mprotect, msync, munmap

## Thread Management (Section 16)

pthread_attr_init, pthread_attr_destroy, pthread_attr_setstacksize, pthread_attr_getstacksize, pthread_create, pthread_exit, pthread_self, pthread_equal

## Thread-Specific Data Functions (Section 17)

pthread_key_create, pthread_setspecific, pthread_getspecific, pthread_key_delete

## 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.