mirror of
https://github.com/tmux/tmux.git
synced 2024-11-13 23:58:51 +00:00
O_NOCTTY.
This commit is contained in:
parent
085d68bcc2
commit
e9fc383256
@ -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>
|
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
|
||||||
@ -33,7 +33,7 @@ forkpty(int *master,
|
|||||||
char *path;
|
char *path;
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
|
|
||||||
if ((*master = open("/dev/ptmx", O_RDWR)) == -1)
|
if ((*master = open("/dev/ptmx", O_RDWR|O_NOCTTY)) == -1)
|
||||||
return (-1);
|
return (-1);
|
||||||
if (grantpt(*master) != 0)
|
if (grantpt(*master) != 0)
|
||||||
goto out;
|
goto out;
|
||||||
@ -42,7 +42,7 @@ forkpty(int *master,
|
|||||||
|
|
||||||
if ((path = ptsname(*master)) == NULL)
|
if ((path = ptsname(*master)) == NULL)
|
||||||
goto out;
|
goto out;
|
||||||
if ((slave = open(path, O_RDWR)) == -1)
|
if ((slave = open(path, O_RDWR|O_NOCTTY)) == -1)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
||||||
switch (pid = fork()) {
|
switch (pid = fork()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user