亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? library_12.html

?? linux_c函數(shù),linux下編程必備的
?? HTML
?? 第 1 頁(yè) / 共 5 頁(yè)
字號(hào):
<H2><A NAME="SEC183" HREF="library_toc.html#SEC183" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC183">File Descriptor Flags</A></H2>
<P>
<DFN>File descriptor flags</DFN> are miscellaneous attributes of a file
descriptor.  These flags are associated with particular file
descriptors, so that if you have created duplicate file descriptors
from a single opening of a file, each descriptor has its own set of flags.
<P>
Currently there is just one file descriptor flag: <CODE>FD_CLOEXEC</CODE>,
which causes the descriptor to be closed if you use any of the
<CODE>exec...</CODE> functions (see section <A HREF="library_23.html#SEC406" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_23.html#SEC406">Executing a File</A>).
<P>
The symbols in this section are defined in the header file
<TT>`fcntl.h'</TT>.
<A NAME="IDX696"></A>
<P>
<A NAME="IDX697"></A>
<U>Macro:</U> int <B>F_GETFD</B><P>
This macro is used as the <VAR>command</VAR> argument to <CODE>fcntl</CODE>, to
specify that it should return the file descriptor flags associated
with the <VAR>filedes</VAR> argument.  
<P>
The normal return value from <CODE>fcntl</CODE> with this command is a
nonnegative number which can be interpreted as the bitwise OR of the
individual flags (except that currently there is only one flag to use).
<P>
In case of an error, <CODE>fcntl</CODE> returns <CODE>-1</CODE>.  The following
<CODE>errno</CODE> error conditions are defined for this command:
<P>
<DL COMPACT>
<DT><CODE>EBADF</CODE>
<DD>The <VAR>filedes</VAR> argument is invalid.
</DL>
<P>
<A NAME="IDX698"></A>
<U>Macro:</U> int <B>F_SETFD</B><P>
This macro is used as the <VAR>command</VAR> argument to <CODE>fcntl</CODE>, to
specify that it should set the file descriptor flags associated with the
<VAR>filedes</VAR> argument.  This requires a third <CODE>int</CODE> argument to
specify the new flags, so the form of the call is:
<P>
<PRE>
fcntl (<VAR>filedes</VAR>, F_SETFD, <VAR>new_flags</VAR>)
</PRE>
<P>
The normal return value from <CODE>fcntl</CODE> with this command is an
unspecified value other than <CODE>-1</CODE>, which indicates an error.
The flags and error conditions are the same as for the <CODE>F_GETFD</CODE>
command.
<P>
The following macro is defined for use as a file descriptor flag with
the <CODE>fcntl</CODE> function.  The value is an integer constant usable
as a bit mask value.
<P>
<A NAME="IDX699"></A>
<A NAME="IDX700"></A>
<U>Macro:</U> int <B>FD_CLOEXEC</B><P>
This flag specifies that the file descriptor should be closed when
an <CODE>exec</CODE> function is invoked; see section <A HREF="library_23.html#SEC406" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_23.html#SEC406">Executing a File</A>.  When
a file descriptor is allocated (as with <CODE>open</CODE> or <CODE>dup</CODE>),
this bit is initially cleared on the new file descriptor, meaning that
descriptor will survive into the new program after <CODE>exec</CODE>.
<P>
If you want to modify the file descriptor flags, you should get the
current flags with <CODE>F_GETFD</CODE> and modify the value.  Don't assume
that the flag listed here is the only ones that are implemented; your
program may be run years from now and more flags may exist then.
For example, here is a function to set or clear the flag <CODE>FD_CLOEXEC</CODE>
without altering any other flags:
<P>
<PRE>
/* Set the <CODE>FD_CLOEXEC</CODE> flag of <VAR>desc</VAR> if <VAR>value</VAR> is nonzero,
   or clear the flag if <VAR>value</VAR> is 0.
   Return 0 on success, or -1 on error with <CODE>errno</CODE> set. */ 

int
set_cloexec_flag (int desc, int value)
{
  int oldflags = fcntl (desc, F_GETFD, 0);
  /* If reading the flags failed, return error indication now.
  if (oldflags &#60; 0)
    return oldflags;
  /* Set just the flag we want to set. */
  if (value != 0)
    oldflags |= FD_CLOEXEC;
  else
    oldflags &#38;= ~FD_CLOEXEC;
  /* Store modified flag word in the descriptor. */
  return fcntl (desc, F_SETFD, oldflags);
}
</PRE>
<P>
<A NAME="IDX701"></A>
<H2><A NAME="SEC184" HREF="library_toc.html#SEC184" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC184">File Status Flags</A></H2>
<P>
<DFN>File status flags</DFN> are used to specify attributes of the opening of
a file.  Unlike the file descriptor flags discussed in section <A HREF="library_12.html#SEC183" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_12.html#SEC183">File Descriptor Flags</A>, the file status flags are shared by duplicated file descriptors
resulting from a single opening of the file.
<P>
The file status flags are initialized by the <CODE>open</CODE> function from
the <VAR>flags</VAR> argument of the <CODE>open</CODE> function.  Some of the flags
are meaningful only in <CODE>open</CODE> and are not remembered subsequently;
many of the rest cannot subsequently be changed, though you can read
their values by examining the file status flags.
<P>
A few file status flags can be changed at any time using <CODE>fcntl</CODE>.
These include <CODE>O_APPEND</CODE> and <CODE>O_NONBLOCK</CODE>.
<P>
The symbols in this section are defined in the header file
<TT>`fcntl.h'</TT>.
<A NAME="IDX702"></A>
<P>
<A NAME="IDX703"></A>
<U>Macro:</U> int <B>F_GETFL</B><P>
This macro is used as the <VAR>command</VAR> argument to <CODE>fcntl</CODE>, to
read the file status flags for the open file with descriptor
<VAR>filedes</VAR>.
<P>
The normal return value from <CODE>fcntl</CODE> with this command is a
nonnegative number which can be interpreted as the bitwise OR of the
individual flags.  The flags are encoded like the <VAR>flags</VAR> argument
to <CODE>open</CODE> (see section <A HREF="library_12.html#SEC172" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_12.html#SEC172">Opening and Closing Files</A>), but only the file
access modes and the <CODE>O_APPEND</CODE> and <CODE>O_NONBLOCK</CODE> flags are
meaningful here.  Since the file access modes are not single-bit values,
you can mask off other bits in the returned flags with <CODE>O_ACCMODE</CODE>
to compare them.
<P>
In case of an error, <CODE>fcntl</CODE> returns <CODE>-1</CODE>.  The following
<CODE>errno</CODE> error conditions are defined for this command:
<P>
<DL COMPACT>
<DT><CODE>EBADF</CODE>
<DD>The <VAR>filedes</VAR> argument is invalid.
</DL>
<P>
<A NAME="IDX704"></A>
<U>Macro:</U> int <B>F_SETFL</B><P>
This macro is used as the <VAR>command</VAR> argument to <CODE>fcntl</CODE>, to set
the file status flags for the open file corresponding to the
<VAR>filedes</VAR> argument.  This command requires a third <CODE>int</CODE>
argument to specify the new flags, so the call looks like this:
<P>
<PRE>
fcntl (<VAR>filedes</VAR>, F_SETFL, <VAR>new_flags</VAR>)
</PRE>
<P>
You can't change the access mode for the file in this way; that is,
whether the file descriptor was opened for reading or writing.  You can
only change the <CODE>O_APPEND</CODE> and <CODE>O_NONBLOCK</CODE> flags.
<P>
The normal return value from <CODE>fcntl</CODE> with this command is an
unspecified value other than <CODE>-1</CODE>, which indicates an error.  The
error conditions are the same as for the <CODE>F_GETFL</CODE> command.
<P>
The following macros are defined for use in analyzing and constructing
file status flag values:
<P>
<DL COMPACT>
<DT><CODE>O_APPEND</CODE>
<DD>The bit that enables append mode for the file.  If set, then all
<CODE>write</CODE> operations write the data at the end of the file, extending
it, regardless of the current file position.
<P>
<DT><CODE>O_NONBLOCK</CODE>
<DD>The bit that enables nonblocking mode for the file.  If this bit is set,
<CODE>read</CODE> requests on the file can return immediately with a failure
status if there is no input immediately available, instead of blocking.
Likewise, <CODE>write</CODE> requests can also return immediately with a
failure status if the output can't be written immediately.
<P>
<DT><CODE>O_NDELAY</CODE>
<DD>This is a synonym for <CODE>O_NONBLOCK</CODE>, provided for compatibility with
BSD.
</DL>
<P>
<A NAME="IDX705"></A>
<U>Macro:</U> int <B>O_ACCMODE</B><P>
This macro stands for a mask that can be bitwise-ANDed with the file
status flag value to produce a value representing the file access mode.
The mode will be <CODE>O_RDONLY</CODE>, <CODE>O_WRONLY</CODE>, or <CODE>O_RDWR</CODE>.
<P>
<DL COMPACT>
<DT><CODE>O_RDONLY</CODE>
<DD>Open the file for read access.
<P>
<DT><CODE>O_WRONLY</CODE>
<DD>Open the file for write access.
<P>
<DT><CODE>O_RDWR</CODE>
<DD>Open the file for both reading and writing.
</DL>
<P>
If you want to modify the file status flags, you should get the current
flags with <CODE>F_GETFL</CODE> and modify the value.  Don't assume that the
flags listed here are the only ones that are implemented; your program
may be run years from now and more flags may exist then.  For example,
here is a function to set or clear the flag <CODE>O_NONBLOCK</CODE> without
altering any other flags:
<P>
<PRE>
/* Set the <CODE>O_NONBLOCK</CODE> flag of <VAR>desc</VAR> if <VAR>value</VAR> is nonzero,
   or clear the flag if <VAR>value</VAR> is 0.
   Return 0 on success, or -1 on error with <CODE>errno</CODE> set. */ 

int
set_nonblock_flag (int desc, int value)
{
  int oldflags = fcntl (desc, F_GETFL, 0);
  /* If reading the flags failed, return error indication now. */
  if (oldflags &#60; 0)
    return oldflags;
  /* Set just the flag we want to set. */
  if (value != 0)
    oldflags |= O_NONBLOCK;
  else
    oldflags &#38;= ~O_NONBLOCK;
  /* Store modified flag word in the descriptor. */
  return fcntl (desc, F_SETFL, oldflags);
}
</PRE>
<P>
<H2><A NAME="SEC185" HREF="library_toc.html#SEC185" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC185">File Locks</A></H2>
<A NAME="IDX706"></A>
<A NAME="IDX707"></A>
<P>
The remaining <CODE>fcntl</CODE> commands are used to support <DFN>record
locking</DFN>, which permits multiple cooperating programs to prevent each
other from simultaneously accessing parts of a file in error-prone
ways.
<A NAME="IDX708"></A>
<A NAME="IDX709"></A>
<P>
An <DFN>exclusive</DFN> or <DFN>write</DFN> lock gives a process exclusive access
for writing to the specified part of the file.  While a write lock is in
place, no other process can lock that part of the file.
<A NAME="IDX710"></A>
<A NAME="IDX711"></A>
<P>
A <DFN>shared</DFN> or <DFN>read</DFN> lock prohibits any other process from
requesting a write lock on the specified part of the file.  However,
other processes can request read locks.
<P>
The <CODE>read</CODE> and <CODE>write</CODE> functions do not actually check to see
whether there are any locks in place.  If you want to implement a
locking protocol for a file shared by multiple processes, your application
must do explicit <CODE>fcntl</CODE> calls to request and clear locks at the
appropriate points.
<P>
Locks are associated with processes.  A process can only have one kind
of lock set for each byte of a given file.  When any file descriptor for
that file is closed by the process, all of the locks that process holds
on that file are released, even if the locks were made using other
descriptors that remain open.  Likewise, locks are released when a
process exits, and are not inherited by child processes created using
<CODE>fork</CODE> (see section <A HREF="library_23.html#SEC405" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_23.html#SEC405">Creating a Process</A>).
<P>
When making a lock, use a <CODE>struct flock</CODE> to specify what kind of
lock and where.  This data type and the associated macros for the
<CODE>fcntl</CODE> function are declared in the header file <TT>`fcntl.h'</TT>.
<A NAME="IDX712"></A>
<P>
<A NAME="IDX713"></A>
<U>struct Type:</U> <B>flock</B><P>
This structure is used with the <CODE>fcntl</CODE> function to describe a file
lock.  It has these members:
<P>
<DL COMPACT>
<DT><CODE>short int l_type</CODE>
<DD>Specifies the type of the lock;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产自产v一区二区三区c| 狠狠色丁香久久婷婷综| 日韩精品中文字幕一区| 国产69精品一区二区亚洲孕妇| 亚洲精品高清视频在线观看| 日韩欧美一区中文| 91在线视频官网| 久久国产综合精品| 亚洲一区二区在线观看视频| 久久精品欧美一区二区三区不卡 | 久久综合丝袜日本网| 91在线看国产| 久久99国产精品久久| 亚洲国产综合色| 亚洲国产成人自拍| 日韩欧美国产一区在线观看| 色8久久人人97超碰香蕉987| 懂色av一区二区三区免费看| 美国毛片一区二区| 亚洲一区中文日韩| 亚洲视频一区二区在线| 国产午夜亚洲精品午夜鲁丝片 | 日韩av电影一区| 亚洲视频你懂的| 国产欧美一区二区三区在线老狼| 欧美一区二区不卡视频| 日本高清不卡视频| av网站一区二区三区| 国产精品亚洲一区二区三区妖精 | 精品国产免费人成电影在线观看四季 | 国产午夜亚洲精品羞羞网站| 欧美一区二区三区四区高清| 精品国产凹凸成av人网站| 欧美日韩不卡在线| 色欧美88888久久久久久影院| 成人在线综合网站| 国产成人精品aa毛片| 国产一区二区三区观看| 精品在线你懂的| 精品综合免费视频观看| 蜜芽一区二区三区| 日日骚欧美日韩| 日本美女一区二区三区| 美女视频黄a大片欧美| 美女一区二区视频| 另类小说色综合网站| 久久国产免费看| 久久精品免费观看| 韩国成人福利片在线播放| 国产综合色视频| 国产成人免费av在线| 国产91清纯白嫩初高中在线观看 | 欧美一区日韩一区| 日韩欧美中文字幕精品| 精品美女一区二区| 国产亚洲人成网站| 日本一区二区视频在线| 日韩一区欧美一区| 亚洲女人的天堂| 亚洲一区二区三区四区五区中文| 亚洲福中文字幕伊人影院| 性久久久久久久久| 毛片av中文字幕一区二区| 久久aⅴ国产欧美74aaa| 国产精品一卡二卡在线观看| 成人av电影免费观看| 色欧美片视频在线观看在线视频| 欧美日韩激情在线| 欧美成人乱码一区二区三区| 欧美国产视频在线| 亚洲精品成人精品456| 日日夜夜精品视频天天综合网| 久久综合综合久久综合| 成人精品鲁一区一区二区| 色婷婷亚洲精品| 欧美剧情片在线观看| 久久久蜜桃精品| 亚洲男人的天堂一区二区| 日韩精品成人一区二区三区| 国产精品 日产精品 欧美精品| 色综合久久综合网| 日韩精品专区在线影院观看| 中文字幕av一区 二区| 亚洲午夜视频在线观看| 韩日精品视频一区| 在线免费不卡视频| 精品国产sm最大网站免费看| 中文字幕中文字幕在线一区| 日韩精品一二三四| 成人avav影音| 欧美一级二级在线观看| 日韩美女久久久| 麻豆精品视频在线观看免费| 91丝袜国产在线播放| 日韩欧美第一区| 一区二区成人在线观看| 国产一区二区精品久久91| 欧美艳星brazzers| 久久精品视频网| 日本亚洲免费观看| 91黄色免费版| 国产日产精品一区| 日韩成人精品在线观看| 99久久er热在这里只有精品15| 欧美电影免费观看高清完整版在| 亚洲四区在线观看| 国产精品一区二区在线播放| 欧美日韩久久一区二区| 亚洲欧洲精品一区二区精品久久久 | 国产精品久久久久天堂| 蜜桃视频一区二区三区| 欧美在线视频日韩| 午夜欧美在线一二页| 成人久久视频在线观看| 欧美电视剧在线看免费| 亚洲成人你懂的| 91免费版pro下载短视频| 国产调教视频一区| 经典三级一区二区| 欧美人与禽zozo性伦| 亚洲女同一区二区| av电影天堂一区二区在线观看| 日韩精品一区二区三区三区免费 | 一区二区久久久久| 99久久久国产精品| 中文字幕免费一区| 国产黄人亚洲片| 久久色.com| 九九精品视频在线看| 日韩欧美国产电影| 蜜桃一区二区三区四区| 欧美精品乱码久久久久久| 亚洲一区二区三区四区的 | 在线中文字幕一区| 亚洲欧美另类久久久精品2019| 成人在线综合网| 国产精品理伦片| 国产 欧美在线| 亚洲国产成人私人影院tom| 国产不卡在线视频| 国产精品国产三级国产三级人妇| 国产成人av影院| 国产精品伦一区二区三级视频| 国产1区2区3区精品美女| 久久九九国产精品| 国产风韵犹存在线视精品| 国产日韩欧美综合在线| 福利电影一区二区| 中文字幕在线一区免费| 不卡av在线网| 亚洲精品国产成人久久av盗摄 | 久久久久久久国产精品影院| 国产一区二区成人久久免费影院 | 国产精品欧美久久久久无广告 | 91浏览器打开| 一区二区视频在线| 欧美日本在线视频| 看片网站欧美日韩| 国产欧美一区视频| 91久久久免费一区二区| 偷偷要91色婷婷| 精品国产乱码久久久久久浪潮| 国产乱码精品一区二区三区五月婷 | 精品国内二区三区| 国产91富婆露脸刺激对白| 亚洲欧美区自拍先锋| 欧美日韩一区二区电影| 麻豆久久久久久久| 欧美高清在线视频| 在线免费观看一区| 久久av资源站| 亚洲欧美一区二区视频| 欧美精品高清视频| 国产精品99久久久久久似苏梦涵| 中文字幕一区二区三| 欧美日韩国产一级| 国产自产2019最新不卡| 亚洲欧美激情插 | 国产精品综合二区| 日韩美女精品在线| 日韩视频免费直播| www.亚洲人| 日韩高清国产一区在线| 中文字幕av一区二区三区免费看| 欧美亚洲动漫制服丝袜| 国产伦理精品不卡| 亚洲一区在线播放| 久久麻豆一区二区| 欧美系列亚洲系列| 国产成人免费xxxxxxxx| 五月婷婷综合网| 国产精品夫妻自拍| 日韩三级伦理片妻子的秘密按摩| 成人h动漫精品一区二| 五月婷婷激情综合| 最新国产精品久久精品| 精品国产91乱码一区二区三区| 91搞黄在线观看| 成人少妇影院yyyy| 久久疯狂做爰流白浆xx|