2004 by Marc J. Rochkind. All rights reserved. Portions marked "Open Source" may be copied under license.

 

Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

c4/ptutil.c File Reference


Detailed Description

Pseudo-Terminal Library [Sec. 4.10.1].

Definition in file ptutil.c.

Go to the source code of this file.

Defines

#define MASTER_NAME_SEARCH
#define PTY_RANGE   "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
#define PTY_PROTO   "/dev/ptyXY"
#define PTY_X   8
#define PTY_Y   9
#define PTY_MS   5

Functions

bool find_and_open_master (PTINFO *p)
PTINFO * pt_open_master (void)
bool pt_open_slave (PTINFO *p)
bool pt_wait_master (PTINFO *p)
bool pt_close_master (PTINFO *p)
bool pt_close_slave (PTINFO *p)


Define Documentation

#define MASTER_NAME_SEARCH
 

Definition at line 33 of file ptutil.c.

#define PTY_MS   5
 

Definition at line 59 of file ptutil.c.

Referenced by pt_open_master().

#define PTY_PROTO   "/dev/ptyXY"
 

Definition at line 56 of file ptutil.c.

Referenced by find_and_open_master().

#define PTY_RANGE   "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"
 

Definition at line 54 of file ptutil.c.

Referenced by find_and_open_master().

#define PTY_X   8
 

Definition at line 57 of file ptutil.c.

Referenced by find_and_open_master().

#define PTY_Y   9
 

Definition at line 58 of file ptutil.c.

Referenced by find_and_open_master().


Function Documentation

bool find_and_open_master PTINFO p  )  [static]
 

Definition at line 62 of file ptutil.c.

References access(), close(), EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, ec_neg1, errno, open(), posix_openpt(), PTINFO::pt_fd_m, PTINFO::pt_name_m, PTY_PROTO, PTY_RANGE, PTY_X, and PTY_Y.

Referenced by pt_open_master().

bool pt_close_master PTINFO p  ) 
 

Definition at line 202 of file ptutil.c.

References close(), EC_CLEANUP_BGN, EC_CLEANUP_END, ec_neg1, and PTINFO::pt_fd_m.

Referenced by main().

bool pt_close_slave PTINFO p  ) 
 

Definition at line 213 of file ptutil.c.

References close(), and PTINFO::pt_fd_s.

PTINFO* pt_open_master void   ) 
 

Definition at line 117 of file ptutil.c.

References close(), EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, ec_false, ec_neg1, ec_null, errno, find_and_open_master(), grantpt(), PTINFO::pt_fd_m, PTINFO::pt_fd_s, PT_MAX_NAME, PTINFO::pt_name_m, PTINFO::pt_name_s, ptsname(), PTY_MS, and unlockpt().

Referenced by main().

bool pt_open_slave PTINFO p  ) 
 

Definition at line 161 of file ptutil.c.

References close(), EC_CLEANUP_BGN, EC_CLEANUP_END, EC_FAIL, ec_neg1, errno, fchmod(), ioctl(), open(), PERM_FILE, PTINFO::pt_fd_s, PTINFO::pt_name_s, and setsid().

Referenced by main().

bool pt_wait_master PTINFO p  ) 
 

Definition at line 187 of file ptutil.c.

References EC_CLEANUP_BGN, EC_CLEANUP_END, ec_neg1, FD_SET(), FD_ZERO(), PT_GET_MASTER_FD, and select().

Referenced by main().


Generated on Fri Apr 23 10:57:08 2004 for AUP2 Example Source by doxygen 1.3.1