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.


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.16 2002/12/21 13:56:04 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, ASSERT, gc_mail_list(), log(), redirect_stdfd(), Run, sendmail(), signal(), and myrun::umask.