1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\" This man page was written by Jeremy Phelps <jphelps@notreached.net>.
3 .\" Redistribute and modify at will.
5 .\" Japanese Version Copyright (c) 2003 Akihiro MOTOKI
6 .\" all rights reserved.
7 .\" Translated Tue Jul 8 01:44:54 JST 2003
8 .\" by Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
10 .\"WORD: pseudoterminal µ¼»÷üËö
11 .\"WORD: specific Æȼ«¤Î
13 .TH GETPT 3 2010-09-10 "GNU" "Linux Programmer's Manual"
15 getpt \- µ¼»÷üËö¥Þ¥¹¥¿ (PTM) ¤ò¥ª¡¼¥×¥ó¤¹¤ë
18 .BR "#define _GNU_SOURCE" " /* feature_test_macros(7) »²¾È */"
19 .B #include <stdlib.h>
25 ¤Ï¡¢µ¼»÷üËö¥Þ¥¹¥¿¤ò¥ª¡¼¥×¥ó¤·¡¢¤½¤Î¥Õ¥¡¥¤¥ë¡¦¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÊÖ¤¹¡£
26 ¤³¤ì¤Ï¡¢ Linux ¥·¥¹¥Æ¥à¤Ë¤ª¤¤¤Æ¤Ï
29 open(/dev/ptmx, O_RDWR | O_NOCTTY);
32 ¤ÈÅù²Á¤Ç¤¢¤ë¡£Ã¢¤·¡¢ GNU Libc ¤ò»ÈÍѤ·¤Æ¤¤¤Æ¤â¡¢
33 µ¼»÷üËö¥Þ¥¹¥¿¤¬¤É¤³¤«Â¾¤Î¾ì½ê¤Ë¤¢¤ë¥·¥¹¥Æ¥à¤â¤¢¤ë¡£
37 ¤Ï¥ª¡¼¥×¥ó¤·¤¿¥Õ¥¡¥¤¥ë¤Î¥Ç¥£¥¹¥¯¥ê¥×¥¿¤òÊÖ¤¹¡£
38 ¤½¤¦¤Ç¤Ê¤¤¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
40 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹Ãͤ¬¥»¥Ã¥È¤µ¤ì¤ë¡£
45 ¤ÇÀâÌÀ¤µ¤ì¤Æ¤¤¤ë¼ï¡¹¤Î¥¨¥é¡¼¤Ç¼ºÇÔ¤¹¤ë²ÄǽÀ¤¬¤¢¤ë¡£
48 ¤Ï¡¢¥Ð¡¼¥¸¥ç¥ó 2.1 °Ê¹ß¤Î glibc ¤ÇÄ󶡤µ¤ì¤Æ¤¤¤ë¡£
51 ¤Ï glibc Æȼ«¤Ç¤¢¤ë¡£Âå¤ï¤ê¤Ë