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.h File Reference


Detailed Description

header for above [Sec. 4.10.1]

Definition in file ptutil.h.

Go to the source code of this file.

Compounds

struct  PTINFO

Defines

#define PT_MAX_NAME   20
#define PT_GET_MASTER_FD(p)   ((p)->pt_fd_m)
#define PT_GET_SLAVE_FD(p)   ((p)->pt_fd_s)

Functions

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


Define Documentation

#define PT_GET_MASTER_FD  )     ((p)->pt_fd_m)
 

Definition at line 17 of file ptutil.h.

Referenced by main(), and pt_wait_master().

#define PT_GET_SLAVE_FD  )     ((p)->pt_fd_s)
 

Definition at line 18 of file ptutil.h.

Referenced by main().

#define PT_MAX_NAME   20
 

Definition at line 8 of file ptutil.h.

Referenced by pt_open_master().


Function Documentation

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