Category "posix"

How to check if file created using `open` is newly created?

When opening a file with O_CREAT set, the file in question will be created if it does not already exist. I want special action to be taken only if the file is n

How to delete or clear all the messages from the POSIX message queue in c?

I want to delete all the messages from the POSIX message queue. I searched on the internet but I didn't find any way to do it instead I found the way to delete

Relationship between shared memory and files

Ignoring some details there are two low-level SHM APIs available for in Linux. We have the older (e.g System V IPC vs POSIX IPC) SysV interface using: ftok shmc

How can I convert a windows path to posix path using node path

I'm developing on windows, but need to know how to convert a windows path (with backslashes \) into a POSIX path with forward slashes (/)? My goal is to conver

Query RTC and NTP time in Linux?

The way the Linux kernel handle time is somewhat complicated as it uses different source of time, and regularly resynchronize everything. There are command-line

Retrieve Linux Time using struct timespec

Can someone please suggest how can I retrieve linux time using struct timespec ts type? It just gives me time since Epoch. Can I get the actual Linux tim

posix_spawn and non-standard pipe setup for ipc between parent and child process

The file actions of posix_spawn describe the setup code for the child process before it might run execve (which deletes stack etc). The intended use case is to

Default field separator for awk

Is the default separator only space for awk?

Why can the posix thread id be NULL in Linux kernel function filp_close?

Below is excerpted from linux kernel: /* * "id" is the POSIX thread ID. We use the * files pointer for this.. */ int filp_close(struct file *filp, fl_owner_

Posix shell: distinguish between empty and not existing variable

In pure /bin/sh how can I distinguish between an empty variable, an unset variable and a not existing (not defined) variable. Here are the case: # Case 1: not

Posix shell: distinguish between empty and not existing variable

In pure /bin/sh how can I distinguish between an empty variable, an unset variable and a not existing (not defined) variable. Here are the case: # Case 1: not

Posix shell: distinguish between empty and not existing variable

In pure /bin/sh how can I distinguish between an empty variable, an unset variable and a not existing (not defined) variable. Here are the case: # Case 1: not

Posix shell: distinguish between empty and not existing variable

In pure /bin/sh how can I distinguish between an empty variable, an unset variable and a not existing (not defined) variable. Here are the case: # Case 1: not