vte r2028 - in trunk: . src
- From: behdad svn gnome org
- To: svn-commits-list gnome org
- Subject: vte r2028 - in trunk: . src
- Date: Wed, 20 Feb 2008 18:39:08 +0000 (GMT)
Author: behdad
Date: Wed Feb 20 18:39:08 2008
New Revision: 2028
URL: http://svn.gnome.org/viewvc/vte?rev=2028&view=rev
Log:
2008-02-20 Behdad Esfahbod <behdad gnome org>
Bug 517709 â VTE's pty.c makes 4096 getrlimit calls when it only needs
one
* src/pty.c (_vte_pty_start_helper): Only close fds 0, 1, and 2.
gnome-pty-helper closes all fds anyway.
Modified:
trunk/ChangeLog
trunk/src/pty.c
Modified: trunk/src/pty.c
==============================================================================
--- trunk/src/pty.c (original)
+++ trunk/src/pty.c Wed Feb 20 18:39:08 2008
@@ -853,11 +853,10 @@
return FALSE;
}
if (_vte_pty_helper_pid == 0) {
- /* Child. Close all descriptors. */
- for (i = 0; i < sysconf(_SC_OPEN_MAX); i++) {
- if (i != tunnel) {
- close(i);
- }
+ /* Child. Close descriptors. No need to close all,
+ * gnome-pty-helper does that anyway. */
+ for (i = 0; i < 3; i++) {
+ close(i);
}
/* Reassign the socket pair to stdio. */
dup2(tunnel, STDIN_FILENO);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]