… | |
… | |
7 | #ifdef __cplusplus |
7 | #ifdef __cplusplus |
8 | |
8 | |
9 | // C++ API |
9 | // C++ API |
10 | |
10 | |
11 | struct ptytty { |
11 | struct ptytty { |
12 | int pty; // pty file descriptor; connected to rxvt |
12 | int pty; // pty file descriptor; connected to terminal emulator |
13 | int tty; // tty file descriptor; connected to child |
13 | int tty; // tty file descriptor; connected to child |
14 | |
14 | |
15 | virtual ~ptytty () |
15 | virtual ~ptytty () |
16 | { |
16 | { |
17 | } |
17 | } |
… | |
… | |
21 | |
21 | |
22 | void close_tty (); |
22 | void close_tty (); |
23 | bool make_controlling_tty (); |
23 | bool make_controlling_tty (); |
24 | void set_utf8_mode (bool on); |
24 | void set_utf8_mode (bool on); |
25 | |
25 | |
|
|
26 | static void sanitise_stdfd (); |
26 | static void init (); |
27 | static void init (); |
27 | static ptytty *create (); // create a new pty object |
28 | static ptytty *create (); // create a new pty object |
28 | |
29 | |
29 | static void drop_privileges (); |
30 | static void drop_privileges (); |
30 | static void use_helper (); |
31 | static void use_helper (); |
… | |
… | |
54 | |
55 | |
55 | void ptytty_close_tty (PTYTTY ptytty); |
56 | void ptytty_close_tty (PTYTTY ptytty); |
56 | int ptytty_make_controlling_tty (PTYTTY ptytty); |
57 | int ptytty_make_controlling_tty (PTYTTY ptytty); |
57 | void ptytty_set_utf8_mode (PTYTTY ptytty, int on); |
58 | void ptytty_set_utf8_mode (PTYTTY ptytty, int on); |
58 | |
59 | |
|
|
60 | void ptytty_sanitise_stdfd (); |
59 | void ptytty_init (); |
61 | void ptytty_init (); |
60 | PTYTTY ptytty_create (); |
62 | PTYTTY ptytty_create (); |
61 | |
63 | |
62 | void ptytty_drop_privileges (); |
64 | void ptytty_drop_privileges (); |
63 | void ptytty_use_helper (); |
65 | void ptytty_use_helper (); |