… | |
… | |
110 | } |
110 | } |
111 | else if (!strcmp (tok, "MSG") && c.recv (tok)) |
111 | else if (!strcmp (tok, "MSG") && c.recv (tok)) |
112 | fprintf (stderr, "%s", (const char *)tok); |
112 | fprintf (stderr, "%s", (const char *)tok); |
113 | else if (!strcmp (tok, "GETFD") && c.recv (cint)) |
113 | else if (!strcmp (tok, "GETFD") && c.recv (cint)) |
114 | { |
114 | { |
115 | if (ptytty::send_fd (c.fd, cint) < 0) |
115 | if (!ptytty::send_fd (c.fd, cint)) |
116 | { |
116 | { |
117 | fprintf (stderr, "unable to send fd %d: ", cint); perror (0); |
117 | fprintf (stderr, "unable to send fd %d: ", cint); perror (0); |
118 | exit (EXIT_FAILURE); |
118 | exit (EXIT_FAILURE); |
119 | } |
119 | } |
120 | } |
120 | } |