Top "Posix" questions

POSIX (Portable Operating System Interface) is a set of standards defining programming APIs, a command interpreter, and common utilities for Unix-like operating systems.

Why are drand48() and friends obsolete?

After all, they seem superior to the standard libc rand(). Have I missed something? (I have spent some time searching …

c random posix obsolete design-rationale
Non-blocking socket with poll

A couple of days ago I had to investigate a problem where my application was showing abnormally high CPU usage …

c sockets posix blocking
send struct in mq_send

I am using POSIX IPC and according to the documentation - http://man7.org/linux/man-pages/man3/mq_send.3.html …

c linux posix ipc mqueue
Why does start_routine for pthread_create return void* and take void*

The function header for pthread_create looks like this: int pthread_create(pthread_t * thread, const pthread_attr_t * attr, …

c posix pthreads
List named semaphores

Is there a way to list all posix-named-semaphores, ipcs doesn't seem to give any info about posix semaphores e.g. …

posix semaphore ubuntu-10.04
MAP_ANONYMOUS with C99 standard

I have an application that uses the mmap system call, I was having an issue getting it to compile for …

c posix glibc mmap
atoi is a standard function. But itoa is not. Why?

Why this distinction? I've landed up with terrible problems, assuming itoa to be in stdlib.h and finally ending up …

c function posix standards itoa
Is glibc's implementation of fprintf() thread-safe?

Is fprintf thread-safe? The glibc manual seems to say it is, but my application, which writes to a file using …

c multithreading posix lighttpd printf
Suppressing "ISO C99 requires rest arguments to be used"

Consider the following two macros: #define PNORM( v, s, ... ) { \ if( VERBOSITY_CHECK( v ) ) { \ if( ( errno = pthread_mutex_lock(&server.…

c gcc posix variadic-functions gcc-warning
getline() vs. fgets(): Control memory allocation

To read lines from a file there are the getline() and fgets() POSIX functions (ignoring the dreaded gets()). It is …

c posix