From e9fc38325605bd01961fa294d20bcb78b28a14e6 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Wed, 18 Jun 2008 22:00:49 +0000 Subject: [PATCH] O_NOCTTY. --- compat/forkpty-sunos.c | 6 +++--- 1 file 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 @@ -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()) {