From f7aa43b3287f9102ae9aed33365f96e9c2416615 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Fri, 13 Aug 2004 14:30:17 +0000 Subject: [PATCH] Updated exec functions --- ChangeLog | 5 +++++ lib/execute.c | 7 ++----- mbsebbs/door.c | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fe3eb6e..74e01db3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,11 @@ v0.61.4 11-Aug-2004 Fixed counter in log that should show the number of linked messages. + mbsebbs: + The exec_nosuid function for doors now also has a extra small + delay just like all other execute functions to prevent problems + on fast machines. + mbuser: Fixed permissions. diff --git a/lib/execute.c b/lib/execute.c index 6d5e4859..9bc049c3 100644 --- a/lib/execute.c +++ b/lib/execute.c @@ -57,7 +57,7 @@ int _execute(char **args, char *in, char *out, char *err) if ((pid = fork()) == 0) { /* * A delay in the child to prevent it returns before the main - * process sess it ever started. + * process sees it ever started. */ msleep(150); @@ -106,11 +106,8 @@ int _execute(char **args, char *in, char *out, char *err) switch (rc) { case -1: - /* - * Seems to be a problem on fast systems, hope it is ok. - */ if (errno == ECHILD) { - Syslog('+', "Execute: no child process, this seems well"); + Syslog('+', "Execute: no child process"); return 0; } else { WriteError("$Wait returned %d, status %d,%d", rc,status>>8,status&0xff); diff --git a/mbsebbs/door.c b/mbsebbs/door.c index d31b7f36..d123cd7b 100644 --- a/mbsebbs/door.c +++ b/mbsebbs/door.c @@ -323,6 +323,7 @@ int exec_nosuid(char *mandato) if (pid == -1) return 1; if (pid == 0) { + msleep(150); char *argv[4]; argv[0] = (char *)"sh"; argv[1] = (char *)"-c";