From 8c96e2a6d941bf5438b587c3d4a5ee1c97f9aa14 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 15 Jul 2015 08:46:35 +0100 Subject: Implement osdep_get_name and osdep_get_cwd for AIX, from J Raynor. --- compat/forkpty-aix.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compat') diff --git a/compat/forkpty-aix.c b/compat/forkpty-aix.c index fd558eb8..6894aa44 100644 --- a/compat/forkpty-aix.c +++ b/compat/forkpty-aix.c @@ -40,6 +40,10 @@ forkpty(int *master, unused char *name, struct termios *tio, struct winsize *ws) if ((path = ttyname(*master)) == NULL) goto out; + + if (name != NULL) + strlcpy(name, path, TTY_NAME_MAX); + if ((slave = open(path, O_RDWR|O_NOCTTY)) == -1) goto out; -- cgit