diff options
author | christos <christos> | 2002-12-18 15:31:21 +0000 |
---|---|---|
committer | christos <christos> | 2002-12-18 15:31:21 +0000 |
commit | 87cc7367d9b09dcd855d1aaede02752a386ded75 (patch) | |
tree | 98a8b06b14b0fef7ac0742c94f51ea96f1859c2d /x11/rxvt/patches | |
parent | 5d6a595a6d35a40e2444ef2b2a906b6bc5e6c187 (diff) | |
download | pkgsrc-87cc7367d9b09dcd855d1aaede02752a386ded75.tar.gz |
keep stdout open so that utmp_update [the kernel] does not bitch
Diffstat (limited to 'x11/rxvt/patches')
-rw-r--r-- | x11/rxvt/patches/patch-ah | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/x11/rxvt/patches/patch-ah b/x11/rxvt/patches/patch-ah new file mode 100644 index 00000000000..da7d2119f41 --- /dev/null +++ b/x11/rxvt/patches/patch-ah @@ -0,0 +1,19 @@ +$NetBSD: patch-ah,v 1.5 2002/12/18 15:31:22 christos Exp $ + +--- src/init.c.orig Sun Mar 26 02:47:01 2000 ++++ src/init.c Wed Dec 18 10:29:05 2002 +@@ -895,9 +895,13 @@ + /* + * Close all unused file descriptors. + * We don't want them, we don't need them. ++ * We keep stdout/stderr, and we will re-open stdin, because ++ * we want 0,1,2 open so that when pututxline() calls utmp_update ++ * which is set{u,g}id() the kernel does not complain. + */ + for (i = 0; i < num_fds; i++) { +- if (i == STDERR_FILENO || i == cfd || i == tty_fd || i == Xfd) ++ if (i == STDOUT_FILENO || i == STDERR_FILENO ++ || i == cfd || i == tty_fd || i == Xfd) + continue; + close(i); + } |