… | |
… | |
19 | * along with this program; if not, write to the Free Software |
19 | * along with this program; if not, write to the Free Software |
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 | *----------------------------------------------------------------------*/ |
21 | *----------------------------------------------------------------------*/ |
22 | |
22 | |
23 | #include "../config.h" |
23 | #include "../config.h" |
24 | #include "rxvt.h" |
|
|
25 | #include "rxvtdaemon.h" |
|
|
26 | #include "fdpass.h" |
|
|
27 | #include "iom.h" |
|
|
28 | |
|
|
29 | #include <cstdio> |
24 | #include <cstdio> |
30 | #include <cstdlib> |
25 | #include <cstdlib> |
31 | #include <cstdarg> |
26 | #include <cstdarg> |
32 | #include <cstring> |
27 | #include <cstring> |
33 | |
28 | |
… | |
… | |
38 | #include <sys/socket.h> |
33 | #include <sys/socket.h> |
39 | #include <sys/un.h> |
34 | #include <sys/un.h> |
40 | |
35 | |
41 | #include <cerrno> |
36 | #include <cerrno> |
42 | |
37 | |
43 | extern char **environ; |
38 | #include "rxvt.h" |
|
|
39 | #include "rxvtdaemon.h" |
|
|
40 | #include "libptytty.h" |
|
|
41 | #include "iom.h" |
44 | |
42 | |
45 | struct server : rxvt_connection { |
43 | struct server : rxvt_connection { |
46 | log_callback log_cb; |
44 | log_callback log_cb; |
47 | getfd_callback getfd_cb; |
45 | getfd_callback getfd_cb; |
48 | |
46 | |
… | |
… | |
120 | |
118 | |
121 | int server::getfd (int remote_fd) |
119 | int server::getfd (int remote_fd) |
122 | { |
120 | { |
123 | send ("GETFD"); |
121 | send ("GETFD"); |
124 | send (remote_fd); |
122 | send (remote_fd); |
125 | return rxvt_recv_fd (fd); |
123 | return ptytty::recv_fd (fd); |
126 | } |
124 | } |
127 | |
125 | |
128 | void server::log_msg (const char *msg) |
126 | void server::log_msg (const char *msg) |
129 | { |
127 | { |
130 | send ("MSG"), send (msg); |
128 | send ("MSG"), send (msg); |