$OpenBSD: patch-src_fe-common_core_fe-exec_c,v 1.1 2011/11/16 10:16:57 sthen Exp $
--- src/fe-common/core/fe-exec.c.orig	Sun Nov  6 04:58:05 2011
+++ src/fe-common/core/fe-exec.c	Sun Nov  6 04:58:12 2011
@@ -197,11 +197,16 @@ static void process_destroy(PROCESS_REC *rec, int stat
 static void processes_killall(int signum)
 {
 	GSList *tmp;
+	int kill_ret;
 
 	for (tmp = processes; tmp != NULL; tmp = tmp->next) {
 		PROCESS_REC *rec = tmp->data;
 
-		kill(rec->pid, signum);
+		kill_ret = kill(-rec->pid, signum);
+		if (kill_ret != 0)
+		        printtext(NULL, NULL, MSGLEVEL_CLIENTERROR,
+		                  "Error sending signal %d to pid %d: %s",
+		                  signum, rec->pid, g_strerror(errno));
 	}
 }
 
@@ -304,9 +309,9 @@ static void process_exec(PROCESS_REC *rec, const char 
 
 	if (rec->pid != 0) {
 		/* parent process */
-                GIOChannel *outio = g_io_channel_unix_new(in[1]);
+                GIOChannel *outio = g_io_channel_new(in[1]);
 
-		rec->in = g_io_channel_unix_new(out[0]);
+		rec->in = g_io_channel_new(out[0]);
 		rec->out = net_sendbuffer_create(outio, 0);
 
                 close(out[1]);
@@ -378,7 +383,7 @@ static void handle_exec(const char *args, GHashTable *
 	PROCESS_REC *rec;
 	SERVER_REC *target_server;
         char *target, *level;
-	int notice, signum, interactive, target_nick, target_channel;
+	int notice, signum, interactive, target_nick, target_channel, kill_ret;
 
 	/* check that there's no unknown options. we allowed them
 	   because signals can be used as options, but there should be
@@ -445,8 +450,12 @@ static void handle_exec(const char *args, GHashTable *
 	}
 
 	if (signum != -1) {
-		/* send a signal to process */
-                kill(rec->pid, signum);
+		/* send a signal to process group */
+                kill_ret = kill(-rec->pid, signum);
+                if (kill_ret != 0)
+                        printtext(NULL, NULL, MSGLEVEL_CLIENTERROR,
+                                  "Error sending signal %d to pid %d: %s",
+                                  signum, rec->pid, g_strerror(errno));
                 return;
 	}
 
@@ -529,8 +538,8 @@ static void handle_exec(const char *args, GHashTable *
 /* SYNTAX: EXEC [-] [-nosh] [-out | -msg <target> | -notice <target>]
 		[-name <name>] <cmd line>
 	   EXEC -out | -window | -msg <target> | -notice <target> |
-		-close | -<signal> <id>
-	   EXEC -in <id> <text to send to process> */
+		-close | -<signal> %<id>
+	   EXEC -in %<id> <text to send to process> */
 static void cmd_exec(const char *data, SERVER_REC *server, WI_ITEM_REC *item)
 {
 	GHashTable *optlist;
