diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-11-08 18:21:27 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2006-11-08 18:21:27 +0000 |
commit | df04025b341685cbc84e110d4088caecb6d23d2d (patch) | |
tree | 1bcaae84577f71aa32751bfe4cedfd0381925011 | |
parent | 80c0258c878a5f476e6dcad667dd9fa68694aee1 (diff) | |
download | mailfromd-df04025b341685cbc84e110d4088caecb6d23d2d.tar.gz mailfromd-df04025b341685cbc84e110d4088caecb6d23d2d.tar.bz2 |
(parse_state_arg): Bugfix: do not reuse the parser buffer.
(gacopyz_run): Call gacopyz_cleanup_children at the start of the
loop, to ensure the children are collected ASAP.
git-svn-id: file:///svnroot/mailfromd/branches/release_3_0_patches@824 7a8a7f39-df28-0410-adc6-e0d955640f24
-rw-r--r-- | gacopyz/gacopyz.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gacopyz/gacopyz.c b/gacopyz/gacopyz.c index 2d9d4d1d..adb64115 100644 --- a/gacopyz/gacopyz.c +++ b/gacopyz/gacopyz.c @@ -1141,7 +1141,8 @@ parse_state_arg(union state_arg *arg, enum state_arg_type type, return MI_FAILURE; } - for (i = 0, p = buffer; i < count; i++, p += strlen(p) + 1) + for (i = 0, p = arg->argv.buffer; i < count; + i++, p += strlen(p) + 1) arg->argv.v[i] = p; arg->argv.v[i] = NULL; return MI_SUCCESS; @@ -1388,6 +1389,8 @@ gacopyz_run(gacopyz_conn_t conn) struct timeval timeout = conn->master_timeout; int rc; + gacopyz_cleanup_children(conn); + FD_ZERO(&rfd); FD_SET(conn->sd, &rfd); rc = select(conn->sd + 1, &rfd, NULL, NULL, &timeout); @@ -1400,7 +1403,6 @@ gacopyz_run(gacopyz_conn_t conn) conn->desc.xxfi_idle(conn); } else gacopyz_handle_connection(conn); - gacopyz_cleanup_children(conn); } gacopyz_cleanup_conn(conn); return MI_SUCCESS; |