case CMD_EXEC: if (fork()==0) { struct rlimit rl; unsigned long i;
/* Close any open descriptors except for STD* */ getrlimit (RLIMIT_NOFILE, &rl); for (i = STDERR_FILENO+1; i < rl.rlim_cur; i++) close(i);
/* Disassociate any TTYs */ setsid();
execl ("/bin/sh", "/bin/sh", "-c", m->menuItem[j].param, NULL); exit (0); }
I'm looking into it a little bit, but I think that others could shed some light on this.
Harold