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

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

?? library_19.html

?? linux_c函數(shù),linux下編程必備的
?? HTML
?? 第 1 頁 / 共 4 頁
字號:
using the return value of <CODE>sleep</CODE>, when nonzero, to call
<CODE>sleep</CODE> again.  This will work with a certain amount of accuracy as
long as signals arrive infrequently.  But each signal can cause the
eventual wakeup time to be off by an additional second or so.  Suppose a
few signals happen to arrive in rapid succession by bad luck--there is
no limit on how much this could shorten or lengthen the wait.
<P>
Instead, compute the time at which the program should stop waiting, and
keep trying to wait until that time.  This won't be off by more than a
second.  With just a little more work, you can use <CODE>select</CODE> and
make the waiting period quite accurate.  (Of course, heavy system load
can cause unavoidable additional delays--unless the machine is 
dedicated to one application, there is no way you can avoid this.)
<P>
On some systems, <CODE>sleep</CODE> can do strange things if your program uses
<CODE>SIGALRM</CODE> explicitly.  Even if <CODE>SIGALRM</CODE> signals are being
ignored or blocked when <CODE>sleep</CODE> is called, <CODE>sleep</CODE> might
return prematurely on delivery of a <CODE>SIGALRM</CODE> signal.  If you have
established a handler for <CODE>SIGALRM</CODE> signals and a <CODE>SIGALRM</CODE>
signal is delivered while the process is sleeping, the action taken
might be just to cause <CODE>sleep</CODE> to return instead of invoking your
handler.  And, if <CODE>sleep</CODE> is interrupted by delivery of a signal
whose handler requests an alarm or alters the handling of <CODE>SIGALRM</CODE>,
this handler and <CODE>sleep</CODE> will interfere.
<P>
On the GNU system, it is safe to use <CODE>sleep</CODE> and <CODE>SIGALRM</CODE> in
the same program, because <CODE>sleep</CODE> does not work by means of
<CODE>SIGALRM</CODE>.
<P>
<H2><A NAME="SEC323" HREF="library_toc.html#SEC323" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC323">Resource Usage</A></H2>
<A NAME="IDX1412"></A>
<P>
The function <CODE>getrusage</CODE> and the data type <CODE>struct rusage</CODE>
are used for examining the usage figures of a process.  They are declared
in <TT>`sys/resource.h'</TT>.
<P>
<A NAME="IDX1413"></A>
<U>Function:</U> int <B>getrusage</B> <I>(int <VAR>processes</VAR>, struct rusage *<VAR>rusage</VAR>)</I><P>
This function reports the usage totals for processes specified by
<VAR>processes</VAR>, storing the information in <CODE>*<VAR>rusage</VAR></CODE>.
<P>
In most systems, <VAR>processes</VAR> has only two valid values:
<P>
<DL COMPACT>
<DT><CODE>RUSAGE_SELF</CODE>
<DD>Just the current process.
<P>
<DT><CODE>RUSAGE_CHILDREN</CODE>
<DD>All child processes (direct and indirect) that have terminated already.
</DL>
<P>
In the GNU system, you can also inquire about a particular child process
by specifying its process ID.
<P>
The return value of <CODE>getrusage</CODE> is zero for success, and <CODE>-1</CODE>
for failure.
<P>
<DL COMPACT>
<DT><CODE>EINVAL</CODE>
<DD>The argument <VAR>processes</VAR> is not valid.
</DL>
<P>
One way of getting usage figures for a particular child process is with
the function <CODE>wait4</CODE>, which returns totals for a child when it
terminates.  See section <A HREF="library_23.html#SEC409" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_23.html#SEC409">BSD Process Wait Functions</A>.
<P>
<A NAME="IDX1414"></A>
<U>Data Type:</U> <B>struct rusage</B><P>
This data type records a collection usage amounts for various sorts of
resources.  It has the following members, and possibly others:
<P>
<DL COMPACT>
<DT><CODE>struct timeval ru_utime</CODE>
<DD>User time used.
<P>
<DT><CODE>struct timeval ru_stime</CODE>
<DD>System time used.
<P>
<DT><CODE>long ru_majflt</CODE>
<DD>Number of page faults.
<P>
<DT><CODE>long ru_inblock</CODE>
<DD>Number of block input operations.
<P>
<DT><CODE>long ru_oublock</CODE>
<DD>Number of block output operations.
<P>
<DT><CODE>long ru_msgsnd</CODE>
<DD>Number of messages sent.
<P>
<DT><CODE>long ru_msgrcv</CODE>
<DD>Number of messages received.
<P>
<DT><CODE>long ru_nsignals</CODE>
<DD>Number of signals received.
</DL>
<P>
An additional historical function for examining usage figures,
<CODE>vtimes</CODE>, is supported but not documented here.  It is declared in
<TT>`sys/vtimes.h'</TT>.
<P>
<A NAME="IDX1415"></A>
<A NAME="IDX1416"></A>
<A NAME="IDX1417"></A>
<H2><A NAME="SEC324" HREF="library_toc.html#SEC324" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC324">Limiting Resource Usage</A></H2>
<P>
You can specify limits for the resource usage of a process.  When the
process tries to exceed a limit, it may get a signal, or the system call
by which it tried to do so may fail, depending on the limit.  Each
process initially inherits its limit values from its parent, but it can
subsequently change them.
<A NAME="IDX1418"></A>
<P>
The symbols in this section are defined in <TT>`sys/resource.h'</TT>.
<P>
<A NAME="IDX1419"></A>
<U>Function:</U> int <B>getrlimit</B> <I>(int <VAR>resource</VAR>, struct rlimit *<VAR>rlp</VAR>)</I><P>
Read the current value and the maximum value of resource <VAR>resource</VAR>
and store them in <CODE>*<VAR>rlp</VAR></CODE>.
<P>
The return value is <CODE>0</CODE> on success and <CODE>-1</CODE> on failure.  The
only possible <CODE>errno</CODE> error condition is <CODE>EFAULT</CODE>.
<P>
<A NAME="IDX1420"></A>
<U>Function:</U> int <B>setrlimit</B> <I>(int <VAR>resource</VAR>, struct rlimit *<VAR>rlp</VAR>)</I><P>
Store the current value and the maximum value of resource <VAR>resource</VAR>
in <CODE>*<VAR>rlp</VAR></CODE>.
<P>
The return value is <CODE>0</CODE> on success and <CODE>-1</CODE> on failure.  The
following <CODE>errno</CODE> error condition is possible:
<P>
<DL COMPACT>
<DT><CODE>EPERM</CODE>
<DD>You tried to change the maximum permissible limit value,
but you don't have privileges to do so.
</DL>
<P>
<A NAME="IDX1421"></A>
<U>Data Type:</U> <B>struct rlimit</B><P>
This structure is used with <CODE>getrlimit</CODE> to receive limit values,
and with <CODE>setrlimit</CODE> to specify limit values.  It has two fields:
<P>
<DL COMPACT>
<DT><CODE>rlim_cur</CODE>
<DD>The current value of the limit in question.
<P>
<DT><CODE>rlim_max</CODE>
<DD>The maximum permissible value of the limit in question.  You cannot set
the current value of the limit to a larger number than this maximum.
Only the super user can change the maximum permissible value.
</DL>
<P>
In <CODE>getrlimit</CODE>, the structure is an output; it receives the current
values.  In <CODE>setrlimit</CODE>, it specifies the new values.
<P>
Here is a list of resources that you can specify a limit for.
Those that are sizes are measured in bytes.
<P>
<DL COMPACT>
<A NAME="IDX1422"></A>
<DT><CODE>RLIMIT_CPU</CODE>
<DD>The maximum amount of cpu time the process can use.  If it runs for
longer than this, it gets a signal: <CODE>SIGXCPU</CODE>.  The value is
measured in seconds.  See section <A HREF="library_21.html#SEC342" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_21.html#SEC342">Nonstandard Signals</A>.
<P>
<A NAME="IDX1423"></A>
<DT><CODE>RLIMIT_FSIZE</CODE>
<DD>The maximum size of file the process can create.  Trying to write a
larger file causes a signal: <CODE>SIGXFSZ</CODE>.  See section <A HREF="library_21.html#SEC342" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_21.html#SEC342">Nonstandard Signals</A>.
<P>
<A NAME="IDX1424"></A>
<DT><CODE>RLIMIT_DATA</CODE>
<DD>The maximum size of data memory for the process.  If the process tries
to allocate data memory beyond this amount, the allocation function
fails.
<P>
<A NAME="IDX1425"></A>
<DT><CODE>RLIMIT_STACK</CODE>
<DD>The maximum stack size for the process.  If the process tries to extend
its stack past this size, it gets a <CODE>SIGSEGV</CODE> signal.
See section <A HREF="library_21.html#SEC336" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_21.html#SEC336">Program Error Signals</A>.
<P>
<A NAME="IDX1426"></A>
<DT><CODE>RLIMIT_CORE</CODE>
<DD>The maximum size core file that this process can create.  If the process
terminates and a core file is made, and this maximum size is not enough,
the core file is truncated.
<P>
<A NAME="IDX1427"></A>
<DT><CODE>RLIMIT_RSS</CODE>
<DD>The maximum amount of physical memory that this process should get.
This parameter is a guide for the system's scheduler and memory
allocator; the system may give the process more memory when there is a
surplus.
<P>
<A NAME="IDX1428"></A>
<DT><CODE>RLIMIT_OPEN_FILES</CODE>
<DD>The maximum number of files that the process can open.
If it tries to open more files than this, it gets error code
<CODE>EMFILE</CODE>.  See section <A HREF="library_2.html#SEC16" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_2.html#SEC16">Error Codes</A>.
<P>
<A NAME="IDX1429"></A>
<DT><CODE>RLIM_NLIMITS</CODE>
<DD>The number of different resource limits.  Any valid <VAR>resource</VAR>
operand must be less than <CODE>RLIM_NLIMITS</CODE>.
</DL>
<P>
<A NAME="IDX1430"></A>
<U>Constant:</U> <B>int</B> <I>RLIM_INFINITY</I><P>
This constant stands for a value of "infinity" when supplied as
the limit value in <CODE>setrlimit</CODE>.
<P>
Two historical functions for setting resource limits, <CODE>ulimit</CODE> and
<CODE>vlimit</CODE>, are not documented here.  The latter is declared in
<TT>`sys/vlimit.h'</TT> and comes from BSD.
<P>
<A NAME="IDX1431"></A>
<A NAME="IDX1432"></A>
<H2><A NAME="SEC325" HREF="library_toc.html#SEC325" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_toc.html#SEC325">Process Priority</A></H2>
<A NAME="IDX1433"></A>
<P>
When several processes try to run, their respective priorities determine
what share of the CPU each process gets.  This section describes how you
can read and set the priority of a process.  All these functions and
macros are declared in <TT>`sys/resource.h'</TT>.
<P>
The range of valid priority values depends on the operating system, but
typically it runs from <CODE>-20</CODE> to <CODE>20</CODE>.  A lower priority value
means the process runs more often.  These constants describe the range of
priority values:
<P>
<DL COMPACT>
<A NAME="IDX1434"></A>
<DT><CODE>PRIO_MIN</CODE>
<DD>The smallest valid priority value.
<P>
<A NAME="IDX1435"></A>
<DT><CODE>PRIO_MAX</CODE>
<DD>The smallest valid priority value.
</DL>
<P>
<A NAME="IDX1436"></A>
<U>Function:</U> int <B>getpriority</B> <I>(int <VAR>class</VAR>, int <VAR>id</VAR>)</I><P>
Read the priority of a class of processes; <VAR>class</VAR> and <VAR>id</VAR>
specify which ones (see below).
<P>
The return value is the priority value on success, and <CODE>-1</CODE> on
failure.  The following <CODE>errno</CODE> error condition are possible for
this function:
<P>
<DL COMPACT>
<DT><CODE>ESRCH</CODE>
<DD>The combination of <VAR>class</VAR> and <VAR>id</VAR> does not match any existing
process.
<P>
<DT><CODE>EINVAL</CODE>
<DD>The value of <VAR>class</VAR> is not valid.
</DL>
<P>
When the return value is <CODE>-1</CODE>, it could indicate failure, or it
could be the priority value.  The only way to make certain is to set
<CODE>errno = 0</CODE> before calling <CODE>getpriority</CODE>, then use <CODE>errno
!= 0</CODE> afterward as the criterion for failure.
<P>
<A NAME="IDX1437"></A>
<U>Function:</U> int <B>setpriority</B> <I>(int <VAR>class</VAR>, int <VAR>id</VAR>, int <VAR>priority</VAR>)</I><P>
Read the priority of a class of processes; <VAR>class</VAR> and <VAR>id</VAR>
specify which ones (see below).
<P>
The return value is <CODE>0</CODE> on success and <CODE>-1</CODE> on failure.  The
following <CODE>errno</CODE> error condition are defined for this function:
<P>
<DL COMPACT>
<DT><CODE>ESRCH</CODE>
<DD>The combination of <VAR>class</VAR> and <VAR>id</VAR> does not match any existing
process.
<P>
<DT><CODE>EINVAL</CODE>
<DD>The value of <VAR>class</VAR> is not valid.
<P>
<DT><CODE>EPERM</CODE>
<DD>You tried to set the priority of some other user's process, and you
don't have privileges for that.
<P>
<DT><CODE>EACCES</CODE>
<DD>You tried to lower the priority of a process, and you don't have
privileges for that.
</DL>
<P>
The arguments <VAR>class</VAR> and <VAR>id</VAR> together specify a set of
processes you are interested in.  These are the possible values for
<VAR>class</VAR>:
<P>
<DL COMPACT>
<A NAME="IDX1438"></A>
<DT><CODE>PRIO_PROCESS</CODE>
<DD>Read or set the priority of one process.  The argument <VAR>id</VAR> is a
process ID.
<P>
<A NAME="IDX1439"></A>
<DT><CODE>PRIO_PGRP</CODE>
<DD>Read or set the priority of one process group.  The argument <VAR>id</VAR> is
a process group ID.
<P>
<A NAME="IDX1440"></A>
<DT><CODE>PRIO_USER</CODE>
<DD>Read or set the priority of one user's processes.  The argument <VAR>id</VAR>
is a user ID.
</DL>
<P>
If the argument <VAR>id</VAR> is 0, it stands for the current process,
current process group, or the current user, according to <VAR>class</VAR>.
<P>
<A NAME="IDX1441"></A>
<U>Function:</U> int <B>nice</B> <I>(int <VAR>increment</VAR>)</I><P>
Increment the priority of the current process by <VAR>increment</VAR>.
The return value is not meaningful.
<P>
Here is an equivalent definition for <CODE>nice</CODE>:
<P>
<PRE>
int
nice (int increment)
{
  int old = getpriority (PRIO_PROCESS, 0);
  setpriority (PRIO_PROCESS, 0, old + increment);
}
</PRE>
<P>
<P>Go to the <A HREF="library_18.html" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_18.html">previous</A>, <A HREF="library_20.html" tppabs="http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_20.html">next</A> section.<P>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线精品视频| 另类人妖一区二区av| 91精品国产综合久久久蜜臀粉嫩| 久久国产精品色| 中文字幕制服丝袜成人av| 欧美浪妇xxxx高跟鞋交| 成人精品小蝌蚪| 日韩**一区毛片| 一区二区三区日韩精品| 国产视频一区在线播放| 91精品国产欧美日韩| 色诱视频网站一区| 高潮精品一区videoshd| 麻豆精品在线看| 亚洲成av人影院在线观看网| 国产精品国产馆在线真实露脸| 欧美成人乱码一区二区三区| 欧洲精品视频在线观看| 成人国产视频在线观看| 国产麻豆午夜三级精品| 免费观看在线综合| 亚洲va韩国va欧美va精品| 亚洲人成精品久久久久| 国产午夜精品理论片a级大结局| 5月丁香婷婷综合| 欧美色男人天堂| 色美美综合视频| av不卡一区二区三区| 国产91精品一区二区麻豆亚洲| 久久精品噜噜噜成人88aⅴ| 视频一区欧美日韩| 亚洲 欧美综合在线网络| 亚洲欧美福利一区二区| 中文字幕中文字幕一区| 国产精品美女久久福利网站| 日本一区二区三区高清不卡| 五月天欧美精品| 一区二区三区中文免费| 日韩毛片视频在线看| 国产精品国模大尺度视频| 国产农村妇女精品| 国产精品视频看| 国产精品美女久久久久久久久久久 | 一区二区三区日韩欧美| 亚洲码国产岛国毛片在线| 亚洲视频一区二区在线| 亚洲欧美日韩国产手机在线| 亚洲欧美日韩国产手机在线| 亚洲精品欧美在线| 亚洲成人激情综合网| 亚洲图片一区二区| 日本vs亚洲vs韩国一区三区二区| 婷婷丁香激情综合| 麻豆精品久久久| 国产乱子伦视频一区二区三区| 国产毛片精品视频| 99精品偷自拍| 欧美性受xxxx| 欧美精品亚洲二区| 精品国产1区2区3区| 久久九九全国免费| 亚洲男同性视频| 午夜欧美2019年伦理| 另类小说综合欧美亚洲| 国产成人亚洲综合a∨猫咪| www.成人网.com| 欧美日韩国产小视频| 日韩久久免费av| 国产精品网站在线| 亚洲一区二区三区中文字幕 | 亚洲午夜一区二区| 久久成人av少妇免费| 成人免费看的视频| 欧美三级电影在线看| 日韩女优制服丝袜电影| 国产精品视频你懂的| 亚洲一卡二卡三卡四卡| 裸体在线国模精品偷拍| 成人免费视频app| 欧美美女网站色| 久久久国际精品| 一区二区三区在线不卡| 美女脱光内衣内裤视频久久网站| 国产成人av电影在线观看| 色老汉av一区二区三区| 精品国产一区二区国模嫣然| 中文字幕日韩一区| 美女脱光内衣内裤视频久久网站| 成人激情校园春色| 欧美一区二区福利在线| 中文字幕一区二区三区视频| 天天免费综合色| 不卡大黄网站免费看| 日韩三级视频在线观看| 亚洲欧美经典视频| 国产一区二区视频在线播放| 欧美性色欧美a在线播放| 国产人成亚洲第一网站在线播放| 亚洲午夜私人影院| 不卡的看片网站| 欧美成人性战久久| 亚洲在线视频免费观看| 国产91清纯白嫩初高中在线观看| 欧美另类高清zo欧美| 国产精品久久午夜夜伦鲁鲁| 久久www免费人成看片高清| 在线视频综合导航| 国产精品美女久久久久久久网站| 麻豆精品一二三| 欧美伦理影视网| 一区二区三区不卡在线观看| 国产东北露脸精品视频| 日韩三级伦理片妻子的秘密按摩| 一区二区三区中文字幕精品精品| 福利视频网站一区二区三区| 日韩精品一区在线观看| 香蕉久久一区二区不卡无毒影院| av激情亚洲男人天堂| 欧美激情一区二区三区不卡| 美女网站视频久久| 欧美一区国产二区| 婷婷久久综合九色国产成人| 色94色欧美sute亚洲13| 17c精品麻豆一区二区免费| 国产剧情一区二区三区| 精品乱码亚洲一区二区不卡| 日韩成人免费电影| 欧美日韩国产成人在线91| 亚洲一区二区三区国产| 色哟哟国产精品免费观看| 最近日韩中文字幕| 波多野结衣亚洲一区| 欧美国产欧美亚州国产日韩mv天天看完整| 精品一区二区三区在线视频| 91精品免费观看| 男女男精品视频网| 日韩一区二区在线免费观看| 日韩中文字幕91| 欧美一区二区三区色| 奇米色一区二区| 欧美哺乳videos| 精品在线你懂的| 久久香蕉国产线看观看99| 激情av综合网| 中文字幕乱码久久午夜不卡| 成人av在线资源| 亚洲人成人一区二区在线观看 | 在线观看日韩国产| 亚洲第一电影网| 69堂精品视频| 麻豆高清免费国产一区| 久久久蜜桃精品| 99在线精品观看| 一区二区三区四区五区视频在线观看 | 激情五月激情综合网| 精品国产乱码久久久久久夜甘婷婷| 久久er精品视频| 国产人成一区二区三区影院| 99久久免费视频.com| 夜夜嗨av一区二区三区网页| 91精品办公室少妇高潮对白| 亚洲国产精品久久一线不卡| 制服丝袜日韩国产| 国产精品性做久久久久久| 国产精品久久久久久久久快鸭| 99精品国产91久久久久久| 亚洲美女视频在线观看| 日韩视频在线你懂得| 国产91综合网| 亚洲成人免费视频| 日韩女优电影在线观看| 9l国产精品久久久久麻豆| 亚洲午夜视频在线| 久久久亚洲欧洲日产国码αv| 成人av电影在线观看| 五月婷婷另类国产| 欧美国产精品专区| 91久久线看在观草草青青| 石原莉奈一区二区三区在线观看| 久久综合99re88久久爱| 色综合久久综合网欧美综合网 | 91精品蜜臀在线一区尤物| 国产成人福利片| 亚洲aⅴ怡春院| 国产情人综合久久777777| 欧美性一二三区| 国产酒店精品激情| 亚洲一区免费在线观看| www国产成人| 欧美久久免费观看| 国产99久久久精品| 免费观看在线综合| 伊人一区二区三区| 久久久久久日产精品| 欧美日韩久久久| 99久久免费精品| 国产一区二区三区国产| 天天操天天干天天综合网| 中文幕一区二区三区久久蜜桃| 欧美一区二区三区在线观看|