Example #1
0
int Spawn(const char *ProgName, const char *Config)
{
    int pid;

    pid=xforkio(0,1,2);
    if (pid==0)
    {
        SwitchProgram(ProgName, Config);
        _exit(pid);
    }
    return(pid);
}
Example #2
0
int Spawn(const char *ProgName, const char *User, const char *Group, const char *Dir)
{
int pid;

pid=ForkWithIO(0,1,2);
if (pid==0)
{
	SwitchProgram(ProgName, User, Group, Dir);
	_exit(pid);
}
return(pid);
}
Example #3
0
int Spawn(const char *ProgName, int Flags, const char *Config)
{
int pid;

pid=ForkWithIO(0,1,2);
if (pid==0)
{
	SwitchProgram(ProgName, Flags, Config);
	_exit(pid);
}
return(pid);
}
Example #4
0
pid_t SpawnWithIO(const char *CommandLine, const char *Config, int StdIn, int StdOut, int StdErr)
{
    pid_t pid;

    pid=xforkio(StdIn,StdOut,StdErr);
    if (pid==0)
    {
        SwitchProgram(CommandLine, Config);
        _exit(pid);
    }

    return(pid);
}
Example #5
0
pid_t SpawnWithIO(const char *CommandLine, int StdIn, int StdOut, int StdErr)
{
pid_t pid;

pid=ForkWithIO(StdIn,StdOut,StdErr);
if (pid==0)
{
SwitchProgram(CommandLine,NULL,NULL,NULL);
_exit(pid);
}

return(pid);
}