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.

When to use the POLLOUT event of the poll C function?

I wrote a small TCP servers with socket() + POLLIN poll() + recv() + send(), but I don't know when to use POLLOUT …

c tcp posix polling
Linux MMAP internals

I have several questions regarding the mmap implementation in Linux systems which don't seem to be very much documented: When …

linux posix mmap
How to get script directory in POSIX sh?

I have the following code in my bash script. Now I wanna use it in POSIX sh. How can I …

bash posix sh
What is the difference between ssize_t and ptrdiff_t?

The C standard (ISO/IEC 9899:2011 or 9899:1999) defines a type ptrdiff_t in <stddef.h>. The POSIX standard (ISO/…

c posix
Alternative way to obtain argc and argv of a process

I'm looking for alternative ways to obtain the command line parameters argc and argv provided to a process without having …

c++ linux windows posix bsd
strdup dumping core on passing NULL

strdup(null) dumps core. Tried in on ubuntu and freeBSD both. why? Shouldn't it return null? char *b = NULL; a = …

c linux compiler-construction posix freebsd
Who uses POSIX realtime signals and why?

I am not being flip I really don't get it. I just read a whole bunch of material on them …

c linux embedded signals posix
How do you use posix_spawn to replace the deprecated 'system' to launch opendiff in Objective-C?

This line of code: system("/Applications/Xcode.app/Contents/Developer/usr/bin/opendiff /Users/LukeSkywalker/Documents/doc1.rtf /Users/LukeSkywalker/…

objective-c ios8 xcode6 posix opendiff
Difference between fclose and close

If I fopen a file, what's the difference between calling fclose or close and which one should I use? If …

c file posix file-descriptor
Unable to set Pthread Priority

I am unable to set Pthread priority using pthread_attr_setschedparam(). I have tried to resolve this issue but couldn't …

c pthreads posix thread-priority