summaryrefslogtreecommitdiff
path: root/x11/mlterm/patches/patch-an
blob: d74dc627b2fd7089d7aa5524d61361a00b11172e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$NetBSD: patch-an,v 1.1 2006/12/19 07:53:57 wiz Exp $

plugged fd leaks.

http://mlterm.cvs.sourceforge.net/mlterm/mlterm/xwindow/x_display.c?r1=1.4&r2=1.5&view=patch

--- xwindow/x_display.c.orig	2003/12/09 11:56:13	1.4
+++ xwindow/x_display.c	2006/10/19 14:41:51	1.5
@@ -7,6 +7,7 @@
 #include  <kiklib/kik_debug.h>
 #include  <kiklib/kik_mem.h>
 #include  <kiklib/kik_str.h>	/* strdup */
+#include  <kiklib/kik_file.h>	/* kik_file_set_cloexec */
 
 #include  "x_xim.h"
 #include  "x_picture.h"
@@ -39,6 +40,9 @@
 		goto  error1 ;
 	}
 
+	/* set close-on-exec flag on the socket connected to X. */
+	kik_file_set_cloexec( XConnectionNumber( disp->display));
+
 	if( ( disp->name = strdup( name)) == NULL)
 	{
 		goto  error2 ;