Back to index

php5  5.3.10
proc_open.h
Go to the documentation of this file.
00001 /*
00002    +----------------------------------------------------------------------+
00003    | PHP Version 5                                                        |
00004    +----------------------------------------------------------------------+
00005    | Copyright (c) 1997-2012 The PHP Group                                |
00006    +----------------------------------------------------------------------+
00007    | This source file is subject to version 3.01 of the PHP license,      |
00008    | that is bundled with this package in the file LICENSE, and is        |
00009    | available through the world-wide-web at the following url:           |
00010    | http://www.php.net/license/3_01.txt                                  |
00011    | If you did not receive a copy of the PHP license and are unable to   |
00012    | obtain it through the world-wide-web, please send a note to          |
00013    | license@php.net so we can mail you a copy immediately.               |
00014    +----------------------------------------------------------------------+
00015    | Author: Wez Furlong <wez@thebrainroom.com>                           |
00016    +----------------------------------------------------------------------+
00017  */
00018 /* $Id: proc_open.h 321634 2012-01-01 13:15:04Z felipe $ */
00019 
00020 #ifdef PHP_WIN32
00021 typedef HANDLE php_file_descriptor_t;
00022 typedef DWORD php_process_id_t;
00023 #else
00024 typedef int php_file_descriptor_t;
00025 typedef pid_t php_process_id_t;
00026 #endif
00027 
00028 #define PHP_PROC_OPEN_MAX_DESCRIPTORS     16
00029 
00030 /* Environment block under win32 is a NUL terminated sequence of NUL terminated
00031  * name=value strings.
00032  * Under unix, it is an argv style array.
00033  * */
00034 typedef struct _php_process_env {
00035        char *envp;
00036 #ifndef PHP_WIN32
00037        char **envarray;
00038 #endif
00039 } php_process_env_t;
00040 
00041 struct php_process_handle {
00042        php_process_id_t     child;
00043 #ifdef PHP_WIN32
00044        HANDLE childHandle;
00045 #endif
00046        int npipes;
00047        long pipes[PHP_PROC_OPEN_MAX_DESCRIPTORS];
00048        char *command;
00049        int is_persistent;
00050        php_process_env_t env;
00051 };
00052