summaryrefslogtreecommitdiffstats
path: root/compat/forkpty-sunos.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2008-06-18 22:00:49 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2008-06-18 22:00:49 +0000
commite9fc38325605bd01961fa294d20bcb78b28a14e6 (patch)
treef7f41d36928ad676ac0e8e21ad9ed433bed9abe8 /compat/forkpty-sunos.c
parent085d68bcc29ecddb6c48e9f32c20648db28f4417 (diff)
O_NOCTTY.
Diffstat (limited to 'compat/forkpty-sunos.c')
-rw-r--r--compat/forkpty-sunos.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/compat/forkpty-sunos.c b/compat/forkpty-sunos.c
index e333b80e..51070f75 100644
--- a/compat/forkpty-sunos.c
+++ b/compat/forkpty-sunos.c
@@ -1,4 +1,4 @@
-/* $Id: forkpty-sunos.c,v 1.3 2008-06-18 21:14:42 nicm Exp $ */
+/* $Id: forkpty-sunos.c,v 1.4 2008-06-18 22:00:49 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -33,7 +33,7 @@ forkpty(int *master,
char *path;
pid_t pid;
- if ((*master = open("/dev/ptmx", O_RDWR)) == -1)
+ if ((*master = open("/dev/ptmx", O_RDWR|O_NOCTTY)) == -1)
return (-1);
if (grantpt(*master) != 0)
goto out;
@@ -42,7 +42,7 @@ forkpty(int *master,
if ((path = ptsname(*master)) == NULL)
goto out;
- if ((slave = open(path, O_RDWR)) == -1)
+ if ((slave = open(path, O_RDWR|O_NOCTTY)) == -1)
goto out;
switch (pid = fork()) {