diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-24 11:30:02 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2007-10-24 11:30:02 +0000 |
commit | 810a8846b7517bd8d2a9274fd16145f165a989d4 (patch) | |
tree | f82723456123b1a49c3b50f62429b3fc61ce639a /window.c | |
parent | f941d270ca52a7330736b75415dacf3b674513b5 (diff) |
A couple of close-on-exec flags.
Diffstat (limited to 'window.c')
-rw-r--r-- | window.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: window.c,v 1.21 2007-10-23 11:25:32 nicm Exp $ */ +/* $Id: window.c,v 1.22 2007-10-24 11:30:02 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -89,6 +89,8 @@ window_create( fatal("fcntl failed"); if (fcntl(fd, F_SETFL, mode|O_NONBLOCK) == -1) fatal("fcntl failed"); + if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) + fatal("fcntl failed"); mode = 1; if (ioctl(fd, TIOCPKT, &mode) == -1) |