summaryrefslogtreecommitdiff
path: root/src/proxsmtpd.c
diff options
context:
space:
mode:
authorStef Walter <stef@memberwebs.com>2005-10-19 05:46:36 +0000
committerStef Walter <stef@memberwebs.com>2005-10-19 05:46:36 +0000
commitfb269bcd784ca431340cf47e7b515f64688bd55e (patch)
tree8cfd8d4e9e7aef232179318526a960d28b45302f /src/proxsmtpd.c
parent131d21a4f9a2758d43344a3446c6812abd58216b (diff)
Fixes from Loic Le Loarer
Diffstat (limited to 'src/proxsmtpd.c')
-rw-r--r--src/proxsmtpd.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/proxsmtpd.c b/src/proxsmtpd.c
index 6afc975..288e3d4 100644
--- a/src/proxsmtpd.c
+++ b/src/proxsmtpd.c
@@ -300,6 +300,14 @@ void cb_del_context(spctx_t* ctx)
* IMPLEMENTATION
*/
+static void kill_myself()
+{
+ while (1) {
+ kill(getpid(), SIGKILL);
+ sleep(1);
+ }
+}
+
static pid_t fork_filter(spctx_t* sp, int* infd, int* outfd, int* errfd)
{
pid_t pid;
@@ -360,7 +368,7 @@ static pid_t fork_filter(spctx_t* sp, int* infd, int* outfd, int* errfd)
if(r < 0)
{
sp_message(sp, LOG_ERR, "couldn't dup descriptors for filter command");
- _exit(1);
+ kill_myself();
}
/* All the necessary environment vars */
@@ -371,7 +379,7 @@ static pid_t fork_filter(spctx_t* sp, int* infd, int* outfd, int* errfd)
/* If that returned then there was an error */
sp_message(sp, LOG_ERR, "error executing the shell for filter command");
- _exit(1);
+ kill_myself();
break;
};