POSIX

This page has been created as a quick reference for Pedigree's POSIX subsystem's compliancy. If a function is not here, it can be assumed to not exist.

This list does not include standard C library functions (eg, malloc) which are provided by newlib.

Statistics

Total POSIX Functions: 273
Total Implemented: 168
Total Not Implemented: 107

The List

The following list is sorted in such a way that implemented functions are above unimplemented functions, and then sorted in ascending alphabetical order.

Function Implemented? Notes
_execve yes none
_exit yes none
_isatty yes none
accept yes always blocks
access yes only checks for file existence: never checks permissions
alarm yes none
basename yes essentially strchr, which is fairly ugly
bind yes will not have expected result on non-listen sockets
chdir yes none
chmod yes allows any change regardless of user privilege
chown yes allows any change regardless of user privilege
clock_gettime yes none
close yes none
closedir yes none
closelog yes none
connect yes none
dlclose yes technically a stub
dlopen yes none
dlsym yes none
dup yes none
dup2 yes none
endpwent yes none
err yes format string issues
fchdir yes none
fchmod yes see chmod
fchown yes see chown
fcntl yes partially implemented - no record locking commands
fork yes none
fpurge yes none
freeaddrinfo yes none
fseek yes none
fstat yes does not set errno on failure
fstatvfs yes doesn't use information from the filesystem
ftruncate yes none
gai_strerror yes none
getaddrinfo yes should be moved into the kernel somewhat
getcwd yes none
getdelim yes none
getdtablesize yes just calls getrlimit for NOFILE
getegid yes none
geteuid yes none
getgid yes none
getgrname yes completely hacked to only return “httpd” for Apache
getgroups yes only returns getgid() in first element
gethostbyaddr yes none
gethostbyname yes none
gethostname yes none
getline yes none
getpagesize yes none
getpgrp yes none
getpid yes none
getprotobyname yes just tcp, udp and icmp
getpwent yes none
getpwnam yes none
getpwuid yes none
getservbyname yes none
getservbyport yes none
getsockname yes returns an empty structure
gettimeofday yes none
getuid yes none
herror yes none
hstrerror yes none
htonl yes none
htons yes none
inet_addr yes none
inet_aton yes calls inet_addr directly
inet_ntoa yes wrapper around sprintf, so potentially exploitable
ioctl yes only implements two commands
kill yes none
listen yes none
lseek yes conditions EOVERFLOW EINVAL and ESPIPE not checked
lstat yes currently synonymous to stat even when working on a symlink
mkdir yes does not set errno on failure (Filesystem::createDirectory should but no current implementations do)
mmap yes some inputs are exploitable, others do not work
munmap yes some areas are not unmappable
nanosleep yes none
ntohl yes none
ntohs yes none
open yes none
opendir yes none
openlog yes none
pipe yes none
poll yes none
pthread_atfork yes none
pthread_attr_destroy yes none
pthread_attr_getdetachstate yes none
pthread_attr_getstacksize yes none
pthread_attr_init yes none
pthread_attr_setdetachstate yes none
pthread_attr_setstacksize yes none
pthread_create yes none
pthread_detach yes none
pthread_equal yes none
pthread_exit yes none
pthread_getspecific yes none
pthread_join yes none
pthread_key_create yes none
pthread_key_delete yes none
pthread_key_destructor yes none
pthread_kill yes none
pthread_mutex_destroy yes none
pthread_mutex_init yes none
pthread_mutex_lock yes none
pthread_mutex_trylock yes none
pthread_mutex_unlock yes none
pthread_once yes none
pthread_self yes none
pthread_setspecific yes none
pthread_sigmask yes none
pthread_spin_destroy yes none
pthread_spin_init yes none
pthread_spin_lock yes none
pthread_spin_trylock yes none
pthread_spin_unlock yes none
raise yes none
read yes none
readdir yes none
readlink yes none
readv yes none
realpath yes copies the first argument into the second argument – not properly implemented.
recv yes see send
recvfrom yes TCP pretends :)
rename yes implemented as a complete read of the old file, and a write into the new file – horrible.
rewinddir yes none
sbrk yes none
sched_yield yes none
select yes uncertain about errorfds handling
sem_close yes badly implemented
sem_destroy yes badly implemented
sem_getvalue yes badly implemented
sem_init yes badly implemented
sem_post yes badly implemented
sem_timedwait yes badly implemented
sem_trywait yes badly implemented
sem_wait yes badly implemented
send yes errno not set if the connection is reset
sendto yes TCP sendto will still send to the connected address not the passed address
setegid yes see setgid
seteuid yes see setuid
setgid yes hardly spec-compliant: zero permission checks
sethostname yes none
setlogmask yes none
setpgid yes none
setpwent yes none
setsid yes none
setuid yes hardly spec-compliant: zero permission checks
shutdown yes none
sigaction yes none
sigaltstack yes none
signal yes none
sleep yes none
socket yes handles only PF_INET and PF_SOCKET for domain
stat yes none
statvfs yes doesn't get information from the filesystem
strsignal yes none
symlink yes none
sysconf yes a lot of entries just return -1
syslog yes none
tcgetattr yes only supports 4 flags
tcsetattr yes see tcgetattr
uname yes not from a syscall
unlink yes does not set errno on failure
usleep yes none
vfork yes essentially just a call to fork()
wait yes none
waitpid yes doesn't handle groups (but that's fine)
write yes none
writev yes none
cfgetispeed no stubbed
cfgetospeed no stubbed
cfsetispeed no stubbed
cfsetospeed no stubbed
chroot no stubbed
dlerror no stubbed
endfsent no stubbed
endgrent no stubbed
endprotoent no stubbed
endservent no stubbed
fdatasync no stubbed
forkpty no stubbed
fpathconf no see pathconf
fstatfs no stubbed
fsync no stubbed
ftime no stubbed
getfsent no stubbed
getfsfile no stubbed
getfsspec no stubbed
getgrent no stubbed
getgrgid no stubbed
getgrgid_r no stubbed
getgrname_r no stubbed
getitimer no stubbed
getmntinfo no stubbed
getnameinfo no stubbed
getpeername no stubbed
getppid no stubbed
getprotobynumber no stubbed
getprotoent no stubbed
getpwnam_r no stubbed
getpwuid_r no stubbed
getrlimit no stubbed
getrusage no stubbed
getservent no stubbed
getsockopt no stubbed
grantpt no stubbed
if_freenameindex no stubbed
if_indextoname no stubbed
if_nameindex no stubbed
if_nametoindex no stubbed
inet_ntop no stubbed
inet_pton no stubbed
initgroups no stubbed
link no stubbed
logwtmp no stubbed
makedev no stubbed
mkdtemp no stubbed
mkfifo no stubbed
mknod no stubbed
mprotect no none
pathconf no stubbed
pause no stubbed
pclose no stubbed
popen no stubbed
pthread_attr_getschedparam no returns 0
pthread_attr_setschedparam no returns 0
pthread_cancel no stubbed
pthread_cond_broadcast no stubbed
pthread_cond_destroy no stubbed
pthread_cond_init no stubbed
pthread_cond_signal no stubbed
pthread_cond_timedwait no stubbed
pthread_cond_wait no stubbed
pthread_condattr_init no stubbed
pthread_mutexattr_destroy no returns 0
pthread_mutexattr_init no returns 0
ptsname no stubbed
pututline no stubbed
recvmsg no stubbed
rmdir no stubbed
sem_open no stubbed
sem_unlink no stubbed
sendmsg no stubbed
setfsent no stubbed
setgrent no stubbed
setgroups no stubbed
setitimer no stubbed
setprotoent no stubbed
setresgid no stubbed
setresuid no stubbed
setreuid no stubbed
setrlimit no stubbed
setsockopt no stubbed
sigblock no stubbed
siggetmask no stubbed
siglongjmp no stubbed
sigmask no stubbed
sigpending no stubbed
sigprocmask no stubbed
sigsetjmp no stubbed
sigsetmask no stubbed
sigsuspend no stubbed
sockatmark no stubbed
socketpair no stubbed
statfs no stubbed
sync no stubbed
tcdrain no stubbed
tcflow no always returns zero
tcflush no always returns zero
tcgetpgrp no stubbed
tcsendbreak no stubbed
timegm no stubbed
times OR getrusage no stubbed
umask no stubbed always returns zero
unlockpt no stubbed
utime no stubbed

Also available in: HTML TXT