Ultimately, I want to be able to know how to use a function without having to look up an example online.
For example, if I do man 2 mkfifo
it displays:
NAME
mkfifo -- make a fifo file
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
int
mkfifo(const char *path, mode_t mode);
DESCRIPTION
Mkfifo() creates a new fifo file with name path. The access permissions are specified by mode and restricted by the umask(2) of the calling process.
The fifo's owner ID is set to the process's effective user ID. The fifo's group ID is set to that of the parent directory in which it is created.
const char *path
is pretty self-explanatory, and I would have no trouble calling mkfifo function with that argument, but my concern is more with the mode_t argument. The man pages give a small explanation as to what the mode is for, but doesn't explain how to use it in order to call the function with it.
Is there any way to navigate through man pages to understand such arguments?
I tried doing man mode_t
, man mode
and nothing came up.