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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? library_22.html

?? linux_c函數,linux下編程必備的
?? HTML
?? 第 1 頁 / 共 3 頁
字號:
use this environment variable, as do many shells and other utilities
which are implemented in terms of those functions.
<P>
The syntax of a path is a sequence of directory names separated by
colons.  An empty string instead of a directory name stands for the 
current directory (see section <A HREF="library_13.html#SEC188" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_13.html#SEC188">Working Directory</A>).
<P>
A typical value for this environment variable might be a string like:
<P>
<PRE>
:/bin:/etc:/usr/bin:/usr/new/X11:/usr/new:/usr/local:/usr/local/bin
</PRE>
<P>
This means that if the user tries to execute a program named <CODE>foo</CODE>,
the system will look for files named <TT>`foo'</TT>, <TT>`/bin/foo'</TT>,
<TT>`/etc/foo'</TT>, and so on.  The first of these files that exists is
the one that is executed.
<P>
<A NAME="IDX1656"></A>
<DT><CODE>TERM</CODE>
<DD><P>
This specifies the kind of terminal that is receiving program output.
Some programs can make use of this information to take advantage of
special escape sequences or terminal modes supported by particular kinds
of terminals.  Many programs which use the termcap library
(see section 'Finding a Terminal Description' in <CITE>The Termcap Library Manual</CITE>) use the <CODE>TERM</CODE> environment variable, for example.
<P>
<A NAME="IDX1657"></A>
<DT><CODE>TZ</CODE>
<DD><P>
This specifies the time zone.  See section <A HREF="library_19.html#SEC318" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_19.html#SEC318">Specifying the Time Zone with <CODE>TZ</CODE></A>, for information about
the format of this string and how it is used.
<P>
<A NAME="IDX1658"></A>
<DT><CODE>LANG</CODE>
<DD><P>
This specifies the default locale to use for attribute categories where
neither <CODE>LC_ALL</CODE> nor the specific environment variable for that
category is set.  See section <A HREF="library_7.html#SEC76" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_7.html#SEC76">Locales and Internationalization</A>, for more information about
locales.
<P>
<A NAME="IDX1659"></A>
<DT><CODE>LC_COLLATE</CODE>
<DD><P>
This specifies what locale to use for string sorting.
<P>
<A NAME="IDX1660"></A>
<DT><CODE>LC_CTYPE</CODE>
<DD><P>
This specifies what locale to use for character sets and character
classification.
<P>
<A NAME="IDX1661"></A>
<DT><CODE>LC_MONETARY</CODE>
<DD><P>
This specifies what locale to use for formatting monetary values.
<P>
<A NAME="IDX1662"></A>
<DT><CODE>LC_NUMERIC</CODE>
<DD><P>
This specifies what locale to use for formatting numbers.
<P>
<A NAME="IDX1663"></A>
<DT><CODE>LC_TIME</CODE>
<DD><P>
This specifies what locale to use for formatting date/time values.
<P>
<A NAME="IDX1664"></A>
<DT><CODE>_POSIX_OPTION_ORDER</CODE>
<DD><P>
If this environment variable is defined, it suppresses the usual
reordering of command line arguments by <CODE>getopt</CODE>.  See section <A HREF="library_22.html#SEC387" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_22.html#SEC387">Program Argument Syntax Conventions</A>.
<P>
</DL>
<P>
<A NAME="IDX1665"></A>
<A NAME="IDX1666"></A>
<H2><A NAME="SEC395" HREF="library_toc.html#SEC395" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC395">Program Termination</A></H2>
<A NAME="IDX1667"></A>
<P>
The usual way for a program to terminate is simply for its <CODE>main</CODE>
function to return.  The <DFN>exit status value</DFN> returned from the
<CODE>main</CODE> function is used to report information back to the process's
parent process or shell.
<P>
A program can also terminate normally by calling the <CODE>exit</CODE>
function.
<P>
In addition, programs can be terminated by signals; this is discussed in
more detail in section <A HREF="library_21.html#SEC330" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_21.html#SEC330">Signal Handling</A>.  The <CODE>abort</CODE> function causes
a signal that kills the program.
<P>
<H3><A NAME="SEC396" HREF="library_toc.html#SEC396" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC396">Normal Termination</A></H3>
<P>
A process terminates normally when the program calls <CODE>exit</CODE>.
Returning from <CODE>main</CODE> is equivalent to calling <CODE>exit</CODE>, and
the value that <CODE>main</CODE> returns is used as the argument to <CODE>exit</CODE>.
<P>
<A NAME="IDX1668"></A>
<U>Function:</U> void <B>exit</B> <I>(int <VAR>status</VAR>)</I><P>
The <CODE>exit</CODE> function terminates the process with status
<VAR>status</VAR>.  This function does not return.
<P>
Normal termination causes the following actions:
<P>
<OL>
<LI>
Functions that were registered with the <CODE>atexit</CODE> or <CODE>on_exit</CODE>
functions are called in the reverse order of their registration.  This
mechanism allows your application to specify its own "cleanup" actions
to be performed at program termination.  Typically, this is used to do
things like saving program state information in a file, or unlocking
locks in shared data bases.
<P>
<LI>
All open streams are closed, writing out any buffered output data.  See
section <A HREF="library_11.html#SEC121" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_11.html#SEC121">Closing Streams</A>.  In addition, temporary files opened
with the <CODE>tmpfile</CODE> function are removed; see section <A HREF="library_11.html#SEC164" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_11.html#SEC164">Temporary Files</A>.
<P>
<LI>
<CODE>_exit</CODE> is called, terminating the program.  See section <A HREF="library_22.html#SEC400" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_22.html#SEC400">Termination Internals</A>.
</OL>
<P>
<A NAME="IDX1669"></A>
<H3><A NAME="SEC397" HREF="library_toc.html#SEC397" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC397">Exit Status</A></H3>
<P>
When a program exits, it can return to the parent process a small
amount of information about the cause of termination, using the
<DFN>exit status</DFN>.  This is a value between 0 and 255 that the exiting
process passes as an argument to <CODE>exit</CODE>.
<P>
Normally you should use the exit status to report very broad information
about success or failure.  You can't provide a lot of detail about the
reasons for the failure, and most parent processes would not want much
detail anyway.
<P>
There are conventions for what sorts of status values certain programs
should return.  The most common convention is simply 0 for success and 1
for failure.  Programs that perform comparison use a different
convention: they use status 1 to indicate a mismatch, and status 2 to
indicate an inability to compare.  Your program should follow an
existing convention if an existing convention makes sense for it.
<P>
A general convention reserves status values 128 and up for special
purposes.  In particular, the value 128 is used to indicate failure to
execute another program in a subprocess.  This convention is not
universally obeyed, but it is a good idea to follow it in your programs.
<P>
<STRONG>Warning:</STRONG> Don't try to use the number of errors as the exit
status.  This is actually not very useful; a parent process would
generally not care how many errors occurred.  Worse than that, it does
not work, because the status value is truncated to eight bits.
Thus, if the program tried to report 256 errors, the parent would
receive a report of 0 errors--that is, success.
<P>
For the same reason, it does not work to use the value of <CODE>errno</CODE>
as the exit status--these can exceed 255.
<P>
<STRONG>Portability note:</STRONG> Some non-POSIX systems use different
conventions for exit status values.  For greater portability, you can
use the macros <CODE>EXIT_SUCCESS</CODE> and <CODE>EXIT_FAILURE</CODE> for the
conventional status value for success and failure, respectively.  They
are declared in the file <TT>`stdlib.h'</TT>.
<A NAME="IDX1670"></A>
<P>
<A NAME="IDX1671"></A>
<U>Macro:</U> int <B>EXIT_SUCCESS</B><P>
This macro can be used with the <CODE>exit</CODE> function to indicate
successful program completion.
<P>
On POSIX systems, the value of this macro is <CODE>0</CODE>.  On other
systems, the value might be some other (possibly non-constant) integer
expression.
<P>
<A NAME="IDX1672"></A>
<U>Macro:</U> int <B>EXIT_FAILURE</B><P>
This macro can be used with the <CODE>exit</CODE> function to indicate
unsuccessful program completion in a general sense.
<P>
On POSIX systems, the value of this macro is <CODE>1</CODE>.  On other
systems, the value might be some other (possibly non-constant) integer
expression.  Other nonzero status values also indicate future.  Certain
programs use different nonzero status values to indicate particular
kinds of "non-success".  For example, <CODE>diff</CODE> uses status value
<CODE>1</CODE> to mean that the files are different, and <CODE>2</CODE> or more to
mean that there was difficulty in opening the files.
<P>
<H3><A NAME="SEC398" HREF="library_toc.html#SEC398" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC398">Cleanups on Exit</A></H3>
<P>
Your program can arrange to run its own cleanup functions if normal
termination happens.  If you are writing a library for use in various
application programs, then it is unreliable to insist that all
applications call the library's cleanup functions explicitly before
exiting.  It is much more robust to make the cleanup invisible to the
application, by setting up a cleanup function in the library itself
using <CODE>atexit</CODE> or <CODE>on_exit</CODE>.
<P>
<A NAME="IDX1673"></A>
<U>Function:</U> int <B>atexit</B> <I>(void (*<VAR>function</VAR>) (void))</I><P>
The <CODE>atexit</CODE> function registers the function <VAR>function</VAR> to be
called at normal program termination.  The <VAR>function</VAR> is called with
no arguments.
<P>
The return value from <CODE>atexit</CODE> is zero on success and nonzero if
the function cannot be registered. 
<P>
<A NAME="IDX1674"></A>
<U>Function:</U> int <B>on_exit</B> <I>(void (*<VAR>function</VAR>)(int <VAR>status</VAR>, void *<VAR>arg</VAR>), void *<VAR>arg</VAR>)</I><P>
This function is a somewhat more powerful variant of <CODE>atexit</CODE>.  It
accepts two arguments, a function <VAR>function</VAR> and an arbitrary
pointer <VAR>arg</VAR>.  At normal program termination, the <VAR>function</VAR> is
called with two arguments:  the <VAR>status</VAR> value passed to <CODE>exit</CODE>,
and the <VAR>arg</VAR>.
<P>
This function is included in the GNU C library only for compatibility
for SunOS, and may not be supported by other implementations.
<P>
Here's a trivial program that illustrates the use of <CODE>exit</CODE> and
<CODE>atexit</CODE>:
<P>
<PRE>
#include &#60;stdio.h&#62;
#include &#60;stdlib.h&#62;

void 
bye (void)
{
  puts ("Goodbye, cruel world....");
}

int
main (void)
{
  atexit (bye);
  exit (EXIT_SUCCESS);
}
</PRE>
<P>
When this program is executed, it just prints the message and exits.
<P>
<A NAME="IDX1675"></A>
<H3><A NAME="SEC399" HREF="library_toc.html#SEC399" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC399">Aborting a Program</A></H3>
<P>
You can abort your program using the <CODE>abort</CODE> function.  The prototype
for this function is in <TT>`stdlib.h'</TT>.
<A NAME="IDX1676"></A>
<P>
<A NAME="IDX1677"></A>
<U>Function:</U> void <B>abort</B> <I>(void)</I><P>
The <CODE>abort</CODE> function causes abnormal program termination.  This
does not execute cleanup functions registered with <CODE>atexit</CODE> or
<CODE>on_exit</CODE>.
<P>
This function actually terminates the process by raising a
<CODE>SIGABRT</CODE> signal, and your program can include a handler to
intercept this signal; see section <A HREF="library_21.html#SEC330" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_21.html#SEC330">Signal Handling</A>.
<P>
<STRONG>Future Change Warning:</STRONG> Proposed Federal censorship regulations
may prohibit us from giving you information about the possibility of
calling this function.  We would be required to say that this is not an
acceptable way of terminating a program.
<P>
<H3><A NAME="SEC400" HREF="library_toc.html#SEC400" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC400">Termination Internals</A></H3>
<P>
The <CODE>_exit</CODE> function is the primitive used for process termination
by <CODE>exit</CODE>.  It is declared in the header file <TT>`unistd.h'</TT>.
<A NAME="IDX1678"></A>
<P>
<A NAME="IDX1679"></A>
<U>Function:</U> void <B>_exit</B> <I>(int <VAR>status</VAR>)</I><P>
The <CODE>_exit</CODE> function is the primitive for causing a process to
terminate with status <VAR>status</VAR>.  Calling this function does not
execute cleanup functions registered with <CODE>atexit</CODE> or
<CODE>on_exit</CODE>.
<P>
When a process terminates for any reason--either by an explicit
termination call, or termination as a result of a signal--the
following things happen:
<P>
<UL>
<LI>
All open file descriptors in the process are closed.  See section <A HREF="library_12.html#SEC171" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_12.html#SEC171">Low-Level Input/Output</A>.
<P>
<LI>
The low-order 8 bits of the return status code are saved to be reported
back to the parent process via <CODE>wait</CODE> or <CODE>waitpid</CODE>; see
section <A HREF="library_23.html#SEC407" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_23.html#SEC407">Process Completion</A>.
<P>
<LI>
Any child processes of the process being terminated are assigned a new
parent process.  (This is the <CODE>init</CODE> process, with process ID 1.)
<P>
<LI>
A <CODE>SIGCHLD</CODE> signal is sent to the parent process.
<P>
<LI>
If the process is a session leader that has a controlling terminal, then
a <CODE>SIGHUP</CODE> signal is sent to each process in the foreground job,
and the controlling terminal is disassociated from that session.
See section <A HREF="library_24.html#SEC411" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_24.html#SEC411">Job Control</A>.
<P>
<LI>
If termination of a process causes a process group to become orphaned,
and any member of that process group is stopped, then a <CODE>SIGHUP</CODE>
signal and a <CODE>SIGCONT</CODE> signal are sent to each process in the
group.  See section <A HREF="library_24.html#SEC411" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_24.html#SEC411">Job Control</A>.
</UL>
<P>Go to the <A HREF="library_21.html" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_21.html">previous</A>, <A HREF="library_23.html" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_23.html">next</A> section.<P>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区美女| 国产精品天天看| 日韩1区2区日韩1区2区| 欧美二区在线观看| 石原莉奈在线亚洲二区| 欧美成人a在线| 成人在线视频一区| 亚洲三级在线观看| 在线观看一区二区视频| 天天射综合影视| 精品卡一卡二卡三卡四在线| 国内精品国产成人国产三级粉色 | 色哟哟一区二区三区| 亚洲宅男天堂在线观看无病毒| 欧美群妇大交群中文字幕| 美女爽到高潮91| 国产精品家庭影院| 欧美日韩高清一区| 国模少妇一区二区三区| 17c精品麻豆一区二区免费| 欧美图区在线视频| 久久国产福利国产秒拍| 国产精品青草综合久久久久99| 欧美视频在线观看一区二区| 蜜臀av性久久久久蜜臀aⅴ四虎 | 日韩欧美123| 波多野结衣的一区二区三区| 午夜影院久久久| 久久久久久久一区| 欧美日韩美少妇| 粉嫩13p一区二区三区| 亚洲一区二区3| 久久久久久久久蜜桃| 欧洲另类一二三四区| 国产一区不卡精品| 亚洲国产精品久久久久婷婷884| 精品日韩成人av| 欧美综合在线视频| 成人精品免费看| 美女久久久精品| 亚洲乱码国产乱码精品精的特点| 日韩西西人体444www| 97久久精品人人做人人爽50路 | 欧美国产精品专区| 欧美一区二区精品| 日本韩国欧美一区| 国产成人精品影视| 麻豆精品精品国产自在97香蕉| 国产精品麻豆欧美日韩ww| 日韩区在线观看| 欧美唯美清纯偷拍| 99视频在线精品| 国产一区在线观看视频| 日韩在线一区二区三区| 亚洲精品国久久99热| 国产欧美日本一区二区三区| 欧美一级搡bbbb搡bbbb| 欧美三级电影在线看| av电影一区二区| 国产成人精品免费看| 极品美女销魂一区二区三区| 丝袜美腿成人在线| 亚洲影视资源网| 亚洲美女少妇撒尿| 亚洲视频精选在线| 亚洲欧美一区二区在线观看| 久久久三级国产网站| 亚洲精品一区二区三区福利| 精品国内二区三区| 日韩欧美在线观看一区二区三区| 欧美网站大全在线观看| 色系网站成人免费| 在线观看亚洲专区| 欧美伊人久久久久久午夜久久久久| 91丨九色丨黑人外教| 成人免费高清在线| 99久久er热在这里只有精品15| 成人禁用看黄a在线| 成人在线综合网站| 91香蕉视频mp4| 91麻豆免费看片| 色妹子一区二区| 欧美日韩亚洲不卡| 91精品国产综合久久香蕉的特点| 337p亚洲精品色噜噜| 欧美一区三区二区| 欧美成人午夜电影| 中文字幕成人在线观看| 国产精品久久久久久久久免费桃花 | 国产大陆a不卡| 岛国av在线一区| 一本色道**综合亚洲精品蜜桃冫| 91麻豆精品视频| 欧美视频你懂的| 欧美成人福利视频| 国产精品看片你懂得| 亚洲精品视频一区| 亚洲国产成人精品视频| 日韩av一区二区三区四区| 国产一区二区三区在线看麻豆| 国产99久久久精品| 欧美影院一区二区三区| 欧美一级片在线看| 国产精品日韩成人| 亚洲国产综合人成综合网站| 免费成人美女在线观看.| 国产99久久久精品| 欧美日韩国产综合草草| 精品成人一区二区| 亚洲视频在线一区二区| 麻豆一区二区三区| 99v久久综合狠狠综合久久| 69av一区二区三区| 中文字幕精品一区二区精品绿巨人 | 精品国产露脸精彩对白 | 久久久久久久久久久黄色| 亚洲人妖av一区二区| 日韩电影一区二区三区| 国产成人av电影免费在线观看| 91丨porny丨最新| 久久综合色综合88| 伊人开心综合网| 国产在线看一区| 色婷婷狠狠综合| 久久精品网站免费观看| 视频一区在线播放| 成人av资源在线| 欧美精品一区二区三区四区| 亚洲一区二区影院| 国产成人av一区二区三区在线 | 亚洲成人av福利| 国产乱子伦视频一区二区三区| 欧美视频一区二区| 亚洲色图在线视频| 国产精品综合二区| 欧美一区二区三区精品| 亚洲黄色小说网站| 福利电影一区二区| 欧美成人欧美edvon| 亚洲国产欧美日韩另类综合| 国产高清在线观看免费不卡| 日韩视频免费直播| 亚洲18女电影在线观看| 97久久超碰国产精品| 久久九九久久九九| 久久99精品久久久久久| 欧美电影影音先锋| 一区二区三区精品视频| 91免费国产视频网站| 国产网站一区二区| 美腿丝袜一区二区三区| 欧美一区二区视频在线观看2022| 亚洲综合在线免费观看| 99久久国产综合色|国产精品| 久久精品欧美一区二区三区不卡 | 国内精品写真在线观看| 欧美日韩高清一区二区不卡| 亚洲综合网站在线观看| 97se亚洲国产综合自在线不卡| 国产精品网站一区| 成人av免费在线观看| 国产农村妇女精品| 国产精品中文有码| 欧美激情一二三区| 成人动漫精品一区二区| 欧美高清在线精品一区| 国产91在线观看| 中文字幕二三区不卡| 99精品一区二区| 亚洲免费观看高清| 精品视频一区三区九区| 偷拍亚洲欧洲综合| 日韩欧美在线网站| 国产高清无密码一区二区三区| 日本一区二区三区dvd视频在线| 国产成人免费视频一区| 日韩一区在线播放| 欧美色图12p| 日本欧美韩国一区三区| 欧美不卡在线视频| 成人福利在线看| 亚洲精品视频免费看| 欧美电影在哪看比较好| 精品一区二区三区视频| 国产精品无人区| 91搞黄在线观看| 日本欧美在线观看| 久久精品夜色噜噜亚洲aⅴ| av中文字幕亚洲| 午夜视黄欧洲亚洲| 久久色.com| 91在线观看视频| 日韩精品视频网站| 久久亚洲私人国产精品va媚药| 成人精品电影在线观看| 亚洲一区二区三区小说| 精品久久久久av影院 | 视频一区二区不卡| 欧美激情在线观看视频免费| 日本乱码高清不卡字幕|