linux 系调用手册

1830阅读 0评论2015-04-29 fangdikui
分类:LINUX

linux 系调用手册哪家强?原来梦里寻她千百度,默然回首,竞在man处
运行下面的命令,会有新发现,也助于记忆在何处寻找她
   ls /usr/share/man/man2
如何使用呢?
   man 2 systemscall_name
如:man 2 open

输出:
OPEN(2)                    Linux Programmer's Manual                   OPEN(2)


NAME
       open, creat - open and possibly create a file or device


SYNOPSIS
       #include
       #include
       #include


       int open(const char *pathname, int flags);
       int open(const char *pathname, int flags, mode_t mode);


       int creat(const char *pathname, mode_t mode);


DESCRIPTION
       Given a pathname for a file, open() returns a file descriptor, a small,
       nonnegative integer  for  use  in  subsequent  system  calls  (read(2),
       write(2), lseek(2), fcntl(2), etc.).  The file descriptor returned by a
       successful call will be the lowest-numbered file  descriptor  not  cur‐
       rently open for the process.


       By  default,  the  new  file descriptor is set to remain open across an
 Manual page open(2) line 1 (press h for help or q to quit)
清晰明了,特此分享,与君享用







上一篇:用GCC来跟踪程序的函数调用关系
下一篇:mjpg-streamer web 摄像头