diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-18 22:00:49 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2008-06-18 22:00:49 +0000 |
commit | e9fc38325605bd01961fa294d20bcb78b28a14e6 (patch) | |
tree | f7f41d36928ad676ac0e8e21ad9ed433bed9abe8 /compat | |
parent | 085d68bcc29ecddb6c48e9f32c20648db28f4417 (diff) |
O_NOCTTY.
Diffstat (limited to 'compat')
-rw-r--r-- | compat/forkpty-sunos.c | 6 |
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()) { |