Skip to content
Advertisement

Tag: freebsd

What happens to pthread_key_create() generated keys after a process fork?

From pthread_key_create FreeBSD man page: /comment … The pthread_key_create() function creates a thread-specific data key visible to all threads in the process. Key values provided by pthread_key_create() are opaque objects used to locate thread-specific data. Although the same key value may be used by different threads, the values bound to the key by pthread_setspecific() are maintained on a per-thread basis

rlim_t errors with login_cap.h in Debian

I’m trying to compile the bsdmainutils package in Debian that uses the /usr/include/login_cap.h header (from libutil-freebsd-dev), and I’m getting a bunch of errors like this: I’m using Debian testing. Is this a bug in login_cap.h? I see rlim_t defined in /usr/include/x86_64-linux-gnu/bits/resource.h – can I just include that file within login_cap.h? If so, do I have to include the arch-dependent path

O_DIRECT vs. O_SYNC on Linux/FreeBSD

I’m writing a program that runs on both Linux and FreeBSD, and I want to make sure that the data is actually written to the file on the physical device when each write() returns, so that my data won’t get lost by accident (eg, power lost, the process is interrupted unexpected, etc.). According to OPEN(2) man page, on Linux (higher

Advertisement