最终,我希望能够知道如何使用函数,而不必在网上查找示例。
例如,如果我这样做man 2 mkfifo
会显示:
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
是非常不言自明的,使用该参数调用 mkfifo 函数我不会有任何问题,但我更关心的是 mode_t 参数。手册页对模式的用途给出了一个小的解释,但没有解释如何使用它来调用函数。
有没有办法浏览手册页来理解这些论点?
我试着做man mode_t
,man mode
没有任何结果。