diff options
Diffstat (limited to 'compat/forkpty-aix.c')
-rw-r--r-- | compat/forkpty-aix.c | 4 |
1 files changed, 4 insertions, 0 deletions
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; |