aboutsummaryrefslogtreecommitdiff
path: root/src/progman.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/progman.c')
-rw-r--r--src/progman.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/src/progman.c b/src/progman.c
index f0cc4c9..35fc876 100644
--- a/src/progman.c
+++ b/src/progman.c
@@ -754,7 +754,13 @@ prog_start (struct prog *prog)
logmsg (LOG_ERR, _("%s: cannot remove file `%s': %s"),
prog->tag, prog->v.p.comp->rmfile, strerror (errno));
}
-
+
+ if (prog->v.p.comp->builtin && prog->v.p.comp->builtin->single_process)
+ {
+ prog->v.p.comp->builtin->fun (prog->v.p.socket);
+ return;
+ }
+
redir[RETR_OUT] = open_redirector (prog, RETR_OUT);
redir[RETR_ERR] = open_redirector (prog, RETR_ERR);
@@ -789,6 +795,14 @@ prog_start (struct prog *prog)
prog->v.p.comp->limits ?
prog->v.p.comp->limits : pies_limits);
+ if (prog->v.p.comp->builtin)
+ {
+ mf_proctitle_format ("inetd %s",
+ prog->v.p.comp->builtin->service);
+ prog->v.p.comp->builtin->fun (prog->v.p.socket);
+ _exit (0);
+ }
+
if (debug_level >= 1)
{
int i;
@@ -843,13 +857,13 @@ prog_start (struct prog *prog)
if (prog->v.p.comp->mode == pies_comp_pass_fd)
FD_SET (prog->v.p.socket, &fdset);
close_fds (&fdset);
-
+
execvp (prog->v.p.comp->program ?
prog->v.p.comp->program : prog->v.p.comp->argv[0],
prog->v.p.comp->argv);
openlog (log_tag, LOG_PID, prog->v.p.comp->facility);
syslog (LOG_CRIT, _("cannot start `%s': %s"), prog->tag,
- strerror (errno));
+ strerror (errno));
_exit (EX_SOFTWARE);
case -1:
@@ -1339,7 +1353,7 @@ prog_start_prerequisites (struct prog *prog)
if (!prog->prereq)
return 0; /* Ok to startup */
- debug (1, ("Starting prerequisites of %s", prog->tag));
+ debug (1, ("starting prerequisites of %s", prog->tag));
ret = 0;
for (i = 0; prog->prereq[i]; i++)
{

Return to:

Send suggestions and report system problems to the System administrator.