.\" Copyright (c) 1980, 1991, 1993 .\" The Regents of the University of California. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\" @(#) getpriority. 2 8.1 (Berkeley) 6/4/93 .\" %FreeBSD: src/lib/libc/sys/getpriority. 2, v 1.4. 2.5 2001/12/14 18:34:00 ru Exp % .\" .\" $FreeBSD: doc/ja_JP.eucJP/man/man2/getpriority. 2, v 1.8 2001/12/23 00:03:42 horikawa Exp $ .Dd June 4, 1993 .Dt GETPRIORITY 2 .Os .Sh ¸íĪ .Nm getpriority , .Nm setpriority .Nd ÇÁ·Î±×·¥ ½ºÄÉÁÙ ¿ì¼± ¼øÀ§¸¦ Ãëµæ / ¼³Á¤ .Sh ÇÁ·Î±×·¥ ¶óÀ̺귯¸® .Lb libc .Sh ¼­½Ä .In sys/time.h .In sys/resource.h .Ft int .Fn getpriority "int which" "int who" .Ft int .Fn setpriority "int which" "int who" "int prio" .Sh ÇØ¼³ .Fa which ¹× .Fa who ±×¸®°í Áö½Ã¹Þ´Â ÇÁ·Î¼¼½º, ÇÁ·Î¼¼½º ±×·ì, ¶Ç´Â À¯ÀúÀÇ ½ºÄÉÁÙ ¿ì¼± ¼øÀ§´Â .Fn getpriority È£Ãâ·Î ÃëµæµÇ¾î .Fn setpriority È£Ãâ·Î ¼³Á¤µË´Ï´Ù. .Fa which (Àº)´Â, .Dv PRIO_PROCESS , .Dv PRIO_PGRP ¶Ç´Â .Dv PRIO_USER ÀÇ ¾î¶² °ÍÀΰ¡¿©, .Fa who ÇÏ .Fa which ¿¡ °ü·ÃÇØ ÇØ¼®µË´Ï´Ù .Dv ( PRIO_PROCESS ÀÇ °æ¿ì´Â ÇÁ·Î¼¼½º ½Äº°ÀÚ, .Dv PRIO_PGRP ÀÇ °æ¿ì´Â ÇÁ·Î¼¼½º ±×·ì ½Äº°ÀÚ, ¹× .Dv PRIO_USER ÀÇ °æ¿ì´Â À¯Àú ID). .Fa who ÀÇ °ªÀÌ 0 ÀÎ °ÍÀº, ÇöÀçÀÇ ÇÁ·Î¼¼½º, ÇÁ·Î¼¼½º ±×·ì, ¶Ç´Â À¯Àú¸¦ ³ªÅ¸³À´Ï´Ù. .Fa prio (Àº)´Â -20 À¸·ÎºÎÅÍ 20 ÀÇ ¹üÀ§ÀÇ °ªÀÔ´Ï´Ù. µðÆúÆ®ÀÇ ¿ì¼± ¼øÀ§´Â 0 ÀÔ´Ï´Ù. ¿ì¼± ¼øÀ§°¡ ³·À¸¸é ½ºÄÉÁÙ Á¶Á¤¿¡´Â º¸´Ù ÇüÆíÀÌ ÁÁ¾ÆÁý´Ï´Ù. .Pp .Fn getpriority È£ÃâÀº, ÁöÁ¤ÀÇ ÇÁ·Î¼¼½ºÁß ÇÑÂÊÀÌ Çâ¼öÇÏ´Â ÃÖ°íÀÇ ¿ì¼± ¼øÀ§¸¦ µ¹·ÁÁÖ¾î ¿É´Ï´Ù (°¡Àå ÀÛÀº ¼öÄ¡ÀÔ´Ï´Ù). .Fn setpriority È£ÃâÀº, ÁöÁ¤µÈ ¸ðµç ÇÁ·Î¼¼½ºÀÇ ¿ì¼± ¼øÀ§¸¦ ÁöÁ¤ÀÇ °ª¿¡ ¼³Á¤ÇÕ´Ï´Ù. ½´ÆÛ À¯Àú¸¸ÀÌ ¿ì¼± ¼øÀ§¸¦ ³·°Ô ÇÒ ¼ö ÀÖ½À´Ï´Ù. .Sh ¹Ýȯ°ª .Fn getpriority (Àº)´Â 󸮸¦ ¿Ã¹Ù¸£°Ô ¿Ï·áÇØµµ °ª -1 À» µ¹·ÁÁÖ´Â ÀÏÀÌ ÀÖÀ¸¹Ç·Î, È£Ãâ Àü¿¡ ¿ÜºÎ º¯¼ö .Va errno (À»)¸¦ Ŭ¸®¾î ÇÏ°í ³ª¼­, ÈÄ¿¡ À̰ÍÀ» Ã¼Å©ÇØ -1 °¡ ¿¡·¯ÀÎÁö, ¶Ç´Â Á¤´çÇÑ °ªÀÎÁö ÆÇÁ¤ÇÒ Çʿ䰡 ÀÖ½À´Ï´Ù. .Pp .Rv -std setpriority .Sh ¿¡·¯ .Fn getpriority (¿Í)°ú .Fn setpriority (Àº)´Â ´ÙÀ½ÀÇ °æ¿ì¿¡ ½ÇÆÐÇÕ´Ï´Ù. .Bl -tag -width Er .It Bq Er ESRCH ÁöÁ¤µÇ¾ú´Ù .Fa which (¿Í)°ú .Fa who ÀÇ °ªÀ» »ç¿ëÇØ, ÇÁ·Î¼¼½º°¡ ¹ß°ßµÇÁö ¾Ê¾Ò½À´Ï´Ù. .It Bq Er EINVAL .Fa which ÇÏÁö¸¸ .Dv PRIO_PROCESS , .Dv PRIO_PGRP ¶Ç´Â .Dv PRIO_USER ÀÇ ¾î¶² °ÍÀ̱⵵ ÇÏÁö ¾Ê¾Ò½À´Ï´Ù. .El .Pp .Bl -tag -width Er »ó±âÀÇ ¿¡·¯ »Ó¸¸ÀÌ ¾Æ´Ï¶ó, .Fn setpriority (Àº)´Â ´ÙÀ½ÀÇ °æ¿ì¿¡ ½ÇÆÐÇÕ´Ï´Ù. .It Bq Er EPERM ÇÁ·Î¼¼½º´Â °ËÃâµÇ¾úÁö¸¸, ±× ½ÇÈ¿ ID µµ ¿­¸Å À¯Àú ID ÀÇ ¾î´ÀÂÊÀ̳ª, È£ÃâÃøÀÇ ½ÇÈ¿ À¯Àú ID ¿¡ ÀÏÄ¡ÇÏÁö ¾Ê¾Ò½À´Ï´Ù. .It Bq Er EACCES ½´ÆÛ À¯Àú°¡ ¾Æ´Ñ °ÍÀÌ ÇÁ·Î¼¼½ºÀÇ ¿ì¼± ¼øÀ§¸¦ ³»¸®·Á°í Çß½À´Ï´Ù. .El .Sh °ü·Ã Ç׸ñ .Xr nice 1 , .Xr fork 2 , .Xr renice 8 .Sh ¿ª»ç .Fn getpriority ÇÔ¼ö´Â .Bx 4.2 ±×¸®°í óÀ½ µîÀåÇß½À´Ï´Ù.