spawn.c File Reference

Function for spawning of a process. More...

Go to the source code of this file.

Functions

void spawn (Process_T P, Command_T C)
 Execute the given command. More...


Detailed Description

Function for spawning of a process.

This function fork's twice to avoid creating any zombie processes. Inspired by code from W. Richard Stevens book, APUE.

Author:
Jan-Henrik Haukeland, <hauk@tildeslash.com>
Version:
$Id: spawn.c,v 1.14 2002/09/13 01:48:37 hauk Exp $

Definition in file spawn.c.


Function Documentation

void spawn Process_T    P,
Command_T    C
 

Execute the given command.

If the execution fails, an alert message is sent to the email addresses found in the process object that has registred interest for restart alerts.

Parameters:
P  A Process object
C  A Command object

Definition at line 84 of file spawn.c.

References mycommand::arg, gc_mail_list(), log(), Run, sendmail(), signal(), and myrun::umask.

Referenced by start_process(), and stop_process().