| 1 |
root |
1.1 |
#ifndef PTYTTY_H |
| 2 |
|
|
#define PTYTTY_H |
| 3 |
|
|
|
| 4 |
|
|
#include "rxvt.h" |
| 5 |
|
|
|
| 6 |
|
|
enum rxvt_privaction { IGNORE = 'i', SAVE = 's', RESTORE = 'r' }; |
| 7 |
|
|
|
| 8 |
|
|
struct rxvt_ptytty { |
| 9 |
|
|
#ifndef RESET_TTY_TO_COMMON_DEFAULTS |
| 10 |
|
|
struct stat savestat; /* original status of our tty */ |
| 11 |
|
|
#endif |
| 12 |
|
|
void privileges (rxvt_privaction action); |
| 13 |
|
|
public: |
| 14 |
|
|
int pty; // pty file descriptor; connected to rxvt |
| 15 |
|
|
int tty; // tty file descriptor; connected to child |
| 16 |
|
|
char *name; |
| 17 |
|
|
|
| 18 |
|
|
rxvt_ptytty (); |
| 19 |
|
|
~rxvt_ptytty (); |
| 20 |
|
|
|
| 21 |
|
|
bool get (); |
| 22 |
|
|
void put (); |
| 23 |
|
|
|
| 24 |
|
|
bool make_controlling_tty (); |
| 25 |
|
|
}; |
| 26 |
|
|
|
| 27 |
|
|
#endif |
| 28 |
|
|
|