Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

execphandler.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "execphandler.h"
#include "bits_n_bytes.h"

Defines

#define MAX_LINE_LEN   1024

Functions

aw_execphandler_t * aw_create_execphandler (const byte_t *cmd, const byte_t *input, u_int32_t max_line_len, u_int32_t timeout, const aw_execphandler_events_t *events, u_int32_t nregexs, const aw_execphandler_regex_t *regexs, int32_t(*regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), int32_t(*regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index), const aw_alarm_sched_t *sched, aw_logger_t *logger)
 Create a execphandler.

void aw_free_execphandler (aw_execphandler_t *eh)
 Free handler and all associated resources.

aw_handler_t * aw_wire_execphandler (aw_wire_mkhandler_args_t *args)
 Create a execphandler using "wire". See header doc for keyword documentation.


Define Documentation

#define MAX_LINE_LEN   1024
 


Function Documentation

aw_execphandler_t* aw_create_execphandler (  const byte_t *  cmd,
const byte_t *  input,
u_int32_t  max_line_len,
u_int32_t  timeout,
const aw_execphandler_events_t *  events,
u_int32_t  nregexs,
const aw_execphandler_regex_t *  regexs,
int32_t(*  regevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
int32_t(*  regmaskevent)(aw_handler_t *h, aw_address_t *eventid, u_int32_t index),
const aw_alarm_sched_t *  sched,
aw_logger_t *  aware_logger
) 
 

Create a execphandler.

Parameters:
cmd Cmd string to exec after macro expanding
input String to write to stdin of new process after macro expanding, may be NULL
max_line_len Size of max line cmd or input, may be 0 for default
timeout Timeout for process to run , 0 means no timeout
events Complete event
nregexs How many regex strings
regexs Array of regex strings/events
regevent Function pointer for event registration
regmaskevent Function pointer for event mask registration
sched Run schedule
aware_logger Aware logger object
Returns:
Handler object

void aw_free_execphandler (  aw_execphandler_t *  h  ) 
 

Free handler and all associated resources.

Parameters:
h The handler

aw_handler_t* aw_wire_execphandler (  aw_wire_mkhandler_args_t *  args  ) 
 

Create a execphandler using "wire". See header doc for keyword documentation.

Aware 0.11.1 Copyright (C) 1998-2005 Russell Leighton (russ@elegant-software.com)