Functions | Variables

src/pexec.c File Reference

#include "../include/pam_netns.h"
Include dependency graph for pexec.c:

Functions

int pexec (const char *cmdpath, char *const argv[], int background, const char *input, char *output, size_t noutput)
 Execute a file in a new process.

Variables

options_t pam_netns_options

Detailed Description

Needed to execute a process in a new environemt.

Author:
Wilhelm Meier
Julian Thome
Date:
2010-08-25

Function Documentation

int pexec ( const char *  cmdpath,
char *const   argv[],
int  background,
const char *  input,
char *  output,
size_t  noutput 
)

Execute a file in a new process.

This function executes a file in a new process (created with fork).

Parameters:
cmdpath Path to file which should be executed.
argv The argument vector
background If this flag is setted to one, the process will be forked to background
input Input String (needed for IPC from parent to child)
output Output String (needed for IPC to get output from child)
noutput Size of output string
Returns:
The resulting char array

Variable Documentation