OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man3 / sem_close.3
1 '\" t
2 .\" Hey Emacs! This file is -*- nroff -*- source.
3 .\"
4 .\" Copyright (C) 2006 Michael Kerrisk <mtk.manpages@gmail.com>
5 .\"
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\"
26 .\" Japanese Version Copyright (c) 2006 Akihiro MOTOKI all rights reserved.
27 .\" Translated 2006-04-18, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
28 .\"
29 .TH SEM_CLOSE 3 2006-03-25 "Linux" "Linux Programmer's Manual"
30 .\"O .SH NAME
31 .SH Ì¾Á°
32 .\"O sem_close \- close a named semaphore
33 sem_close \- Ì¾Á°ÉÕ¤­¥»¥Þ¥Õ¥©¤ò¥¯¥í¡¼¥º¤¹¤ë
34 .\"O .SH SYNOPSIS
35 .SH ½ñ¼°
36 .nf
37 .B #include <semaphore.h>
38 .sp
39 .BI "int sem_close(sem_t *" sem );
40 .fi
41 .sp
42 .\"O Link with \fI\-lrt\fP or \fI\-pthread\fP.
43 \fI\-lrt\fP ¤Þ¤¿¤Ï \fI\-pthread\fP ¤Ç¥ê¥ó¥¯¤¹¤ë¡£
44 .\"O .SH DESCRIPTION
45 .SH ÀâÌÀ
46 .\"O .BR sem_close ()
47 .\"O closes the named semaphore referred to by
48 .\"O .IR sem ,
49 .\"O allowing any resources that the system has allocated to
50 .\"O the calling process for this semaphore to be freed.
51 .BR sem_close ()
52 ¤Ï
53 .I sem
54 ¤¬»²¾È¤¹¤ë̾Á°ÉÕ¤­¥»¥Þ¥Õ¥©¤ò¥¯¥í¡¼¥º¤·¡¢
55 ¤³¤Î¥»¥Þ¥Õ¥©ÍѤ˸ƤӽФ·¸µ¥×¥í¥»¥¹¤Ë¥·¥¹¥Æ¥à¤¬³ä¤êÅö¤Æ¤Æ¤¤¤¿
56 ¥ê¥½¡¼¥¹¤ò²òÊü¤Ç¤­¤ë¤è¤¦¤Ë¤¹¤ë¡£
57 .\"O .SH RETURN VALUE
58 .SH ÊÖ¤êÃÍ
59 .\"O On success
60 .\"O .BR sem_close ()
61 .\"O returns 0; on error, \-1 is returned, with
62 .\"O .I errno
63 .\"O set to indicate the error.
64 À®¸ù¤¹¤ë¤È¡¢
65 .BR sem_close ()
66 ¤Ï 0 ¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
67 .I errno
68 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹Ãͤò¥»¥Ã¥È¤¹¤ë¡£
69 .\"O .SH ERRORS
70 .SH ¥¨¥é¡¼
71 .TP
72 .B EINVAL
73 .\"O .I sem
74 .\"O is not a valid semaphore.
75 .I sem
76 ¤ÏÍ­¸ú¤Ê¥»¥Þ¥Õ¥©¤Ç¤Ï¤Ê¤¤¡£
77 .\"O .SH CONFORMING TO
78 .SH ½àµò
79 POSIX.1-2001.
80 .\"O .SH NOTES
81 .SH Ãí°Õ
82 .\"O All open named semaphores are automatically closed on process
83 .\"O termination, or upon
84 .\"O .BR execve (2).
85 ¥ª¡¼¥×¥ó¤µ¤ì¤¿¤¹¤Ù¤Æ¤Î̾Á°ÉÕ¤­¥»¥Þ¥Õ¥©¤Ï¡¢¥×¥í¥»¥¹½ªÎ»»þ¡¢¤â¤·¤¯¤Ï
86 .BR execve (2)
87 ¼Â¹Ô»þ¤Ë¼«Æ°Åª¤Ë¥¯¥í¡¼¥º¤µ¤ì¤ë¡£
88 .\"O .SH "SEE ALSO"
89 .SH ´ØÏ¢¹àÌÜ
90 .BR sem_getvalue (3),
91 .BR sem_open (3),
92 .BR sem_post (3),
93 .BR sem_unlink (3),
94 .BR sem_wait (3),
95 .BR sem_overview (7)