* Also places the canonical host name into `realhost'. It must be
* freed by the caller.
*/
-static char *pty_init(void *frontend, void **backend_handle, Config *cfg,
- char *host, int port, char **realhost, int nodelay)
+static const char *pty_init(void *frontend, void **backend_handle, Config *cfg,
+ char *host, int port, char **realhost, int nodelay)
{
int slavefd;
pid_t pid, pgrp;
return NULL;
}
-/*
- * Stub routine (we don't have any need to reconfigure this backend).
- */
static void pty_reconfig(void *handle, Config *cfg)
{
+ /*
+ * We don't have much need to reconfigure this backend, but
+ * unfortunately we do need to pick up the setting of Close On
+ * Exit so we know whether to give a `terminated' message.
+ */
+ pty_cfg = *cfg; /* structure copy */
}
/*
- * Stub routine (never called in pterm
+ * Stub routine (never called in pterm).
*/
static void pty_free(void *handle)
{
}
-
/*
* Called to send data down the pty.
*/
return;
}
+/*
+ * Return a list of the special codes that make sense in this
+ * protocol.
+ */
+static const struct telnet_special *pty_get_specials(void *handle)
+{
+ /*
+ * Hmm. When I get round to having this actually usable, it
+ * might be quite nice to have the ability to deliver a few
+ * well chosen signals to the child process - SIGINT, SIGTERM,
+ * SIGKILL at least.
+ */
+ return NULL;
+}
+
static Socket pty_socket(void *handle)
{
return NULL; /* shouldn't ever be needed */
pty_sendbuffer,
pty_size,
pty_special,
+ pty_get_specials,
pty_socket,
pty_exitcode,
pty_sendok,