summaryrefslogtreecommitdiff
path: root/libutil/forkpty.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-11-21 20:40:14 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-11-21 20:40:14 +0000
commite2d30731f8ced0389894f5cd1e81f484c50b1c02 (patch)
tree84d56b3bb1e947ca8085b21a9a5e1d56abd367e3 /libutil/forkpty.c
parent67e320f2201b518732cc46b59ff4f5b0b79c8aec (diff)
Use internal hidden versions of __login_tty/__openpty
Diffstat (limited to 'libutil/forkpty.c')
-rw-r--r--libutil/forkpty.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libutil/forkpty.c b/libutil/forkpty.c
index af1d4becc..82ce8ba27 100644
--- a/libutil/forkpty.c
+++ b/libutil/forkpty.c
@@ -23,12 +23,16 @@
#include <utmp.h>
#include <pty.h>
+extern int __openpty (int *amaster, int *aslave, char *name, struct termios *termp,
+ struct winsize *winp) attribute_hidden;
+extern int __login_tty(int fd) attribute_hidden;
+
int forkpty (int *amaster, char *name,
struct termios *termp, struct winsize *winp)
{
int master, slave, pid;
- if (openpty (&master, &slave, name, termp, winp) == -1)
+ if (__openpty (&master, &slave, name, termp, winp) == -1)
return -1;
switch (pid = fork ())
@@ -38,7 +42,7 @@ int forkpty (int *amaster, char *name,
case 0:
/* Child. */
close (master);
- if (login_tty (slave))
+ if (__login_tty (slave))
_exit (1);
return 0;