File:  [ELWIX - Embedded LightWeight unIX -] / libelwix / inc / elwix / apio.h
Revision 1.1.2.2: download - view: text, annotated - select for diffs - revision graph
Thu Dec 5 14:56:42 2013 UTC (11 years, 9 months ago) by misho
Branches: elwix2_6
initial support for popen/pclose

#ifndef __APIO_H
#define __APIO_H


struct tagPIOPID {
	FILE			*fp;
	pid_t			pid;
	int			stat;

	SLIST_ENTRY(tagPIOPID)	next;
};
typedef SLIST_HEAD(, tagPIOPID) pio_pid_t;


extern pio_pid_t pio_pidlist;


/*
 * e_popen() - ELWIX replacement of standard popen
 *
 * @command = command
 * @type = type
 * @ppid = return pid of child program
 * return: NULL error or !=NULL open program
 */
FILE *e_popen(const char *command, const char *type, pid_t *ppid);
/*
 * e_pclose() - ELWIX replacement of standard pclose
 *
 * @iop = popen handle
 * return: -1 error or !=-1 pid status
 */
int e_pclose(FILE *iop);


#endif

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>