talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 44acb4021a7786f035be3fa89d91f8b3ce110164
parent d6502d5e4a4960d69be92568cc31720d0261a5d4
Author: Colin Leroy <colin@colino.net>
Date:   Tue, 30 Nov 2010 19:39:44 +0000

2010-11-30 [colin]	3.7.7cvs8

	* src/action.c
		Fix bug #2317, 'Action results in "Bad file descriptor"'
		Introduced in 3.7.6cvs57. In fact the error has been there
		since ages, and only new thing is the verification of the
		various functions return code. Let the stuff work as it
		does, as it seems to do the right thing since ages.

Diffstat:
MChangeLog | 9+++++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/action.c | 12++++++------
4 files changed, 17 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,12 @@ +2010-11-30 [colin] 3.7.7cvs8 + + * src/action.c + Fix bug #2317, 'Action results in "Bad file descriptor"' + Introduced in 3.7.6cvs57. In fact the error has been there + since ages, and only new thing is the verification of the + various functions return code. Let the stuff work as it + does, as it seems to do the right thing since ages. + 2010-11-28 [colin] 3.7.7cvs7 * src/gtk/quicksearch.c diff --git a/PATCHSETS b/PATCHSETS @@ -4069,3 +4069,4 @@ ( cvs diff -u -r 1.274.2.318 -r 1.274.2.319 src/mainwindow.c; ) > 3.7.7cvs5.patchset ( cvs diff -u -r 1.204.2.197 -r 1.204.2.198 src/prefs_common.c; ) > 3.7.7cvs6.patchset ( cvs diff -u -r 1.1.2.98 -r 1.1.2.99 src/gtk/quicksearch.c; ) > 3.7.7cvs7.patchset +( cvs diff -u -r 1.12.2.62 -r 1.12.2.63 src/action.c; ) > 3.7.7cvs8.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=7 MICRO_VERSION=7 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=7 +EXTRA_VERSION=8 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/action.c b/src/action.c @@ -978,12 +978,12 @@ static ChildInfo *fork_child(gchar *cmd, const gchar *msg_str, r |= close(chld_out[1]); r |= close(fileno(stderr)); - r |= dup (chld_err[1]); + r |= dup (chld_err[1]); /* why does that fail ? */ r |= close(chld_err[0]); r |= close(chld_err[1]); if (r != 0) - g_warning("%s(%d)", strerror(errno), errno); + debug_print("%s(%d)", strerror(errno), errno); } cmdline[0] = "sh"; @@ -1005,7 +1005,7 @@ static ChildInfo *fork_child(gchar *cmd, const gchar *msg_str, if (sync) r = write(chld_status[1], "1\n", 2); if (r != 0) - g_warning("%s(%d)", strerror(errno), errno); + debug_print("%s(%d)", strerror(errno), errno); perror("fork"); _exit(1); } else { /* Child */ @@ -1025,7 +1025,7 @@ static ChildInfo *fork_child(gchar *cmd, const gchar *msg_str, r |= close(chld_status[1]); if (r != 0) - g_warning("%s(%d)", strerror(errno), errno); + debug_print("%s(%d)", strerror(errno), errno); } _exit(0); } @@ -1090,7 +1090,7 @@ static ChildInfo *fork_child(gchar *cmd, const gchar *msg_str, r = close(chld_in[1]); child_info->chld_in = -1; /* No more input */ if (r != 0) - g_warning("%s(%d)", strerror(errno), errno); + debug_print("%s(%d)", strerror(errno), errno); } return child_info; @@ -1561,7 +1561,7 @@ static void catch_input(gpointer data, gint source, GdkInputCondition cond) r = close(child_info->chld_in); if (r != 0) - g_warning("%s(%d)", strerror(errno), errno); + debug_print("%s(%d)", strerror(errno), errno); child_info->chld_in = -1; debug_print("Input to grand child sent.\n"); }