From 0a3fcb8b74f6fdbdb210b245d282551d33c83a0f Mon Sep 17 00:00:00 2001 From: Fumitoshi UKAI Date: Thu, 17 Jan 2002 10:29:14 +0000 Subject: [w3m-dev 02866] * search.c: #include * search.c (open_migemo): ignore SIG_INT for migemo process * search.c (open_migemo): close_tty() * search.c (open_migemo): use execl() instead of system() From: Hironori Sakamoto --- ChangeLog | 10 +++++++++- search.c | 7 +++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c8c78df..9277804 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-01-17 Hironori Sakamoto + + * [w3m-dev 02866] + * search.c: #include + * search.c (open_migemo): ignore SIG_INT for migemo process + * search.c (open_migemo): close_tty() + * search.c (open_migemo): use execl() instead of system() + 2002-01-17 Hironori Sakamoto * [w3m-dev 02865] @@ -2090,4 +2098,4 @@ * release-0-2-1 * import w3m-0.2.1 -$Id: ChangeLog,v 1.237 2002/01/17 09:26:33 ukai Exp $ +$Id: ChangeLog,v 1.238 2002/01/17 10:29:14 ukai Exp $ diff --git a/search.c b/search.c index d5a7cac..1404828 100644 --- a/search.c +++ b/search.c @@ -1,6 +1,7 @@ -/* $Id: search.c,v 1.13 2002/01/17 09:26:33 ukai Exp $ */ +/* $Id: search.c,v 1.14 2002/01/17 10:29:14 ukai Exp $ */ #include "fm.h" #include "regex.h" +#include #include static void @@ -42,12 +43,14 @@ open_migemo(char *migemo_command) goto err2; if (pid == 0) { /* child */ + signal(SIGINT, SIG_IGN); + close_tty(); close(fdr[0]); close(fdw[1]); dup2(fdw[0], 0); dup2(fdr[1], 1); close(2); - system(migemo_command); + execl("/bin/sh", "sh", "-c", migemo_command, NULL); exit(1); } close(fdr[1]); -- cgit v1.2.3