00001 00002 /* 00003 * server.c Set up and handle communications with a server process. 00004 * 00005 * Server Handling copyright 1992-1999 The Free Software Foundation 00006 * 00007 * Server Handling is free software. 00008 * You may redistribute it and/or modify it under the terms of the 00009 * GNU General Public License, as published by the Free Software 00010 * Foundation; either version 2, or (at your option) any later version. 00011 * 00012 * Server Handling is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with Server Handling. See the file "COPYING". If not, 00019 * write to: The Free Software Foundation, Inc., 00020 * 59 Temple Place - Suite 330, 00021 * Boston, MA 02111-1307, USA. 00022 * 00023 * As a special exception, The Free Software Foundation gives 00024 * permission for additional uses of the text contained in his release 00025 * of ServerHandler. 00026 * 00027 * The exception is that, if you link the ServerHandler library with other 00028 * files to produce an executable, this does not by itself cause the 00029 * resulting executable to be covered by the GNU General Public License. 00030 * Your use of that executable is in no way restricted on account of 00031 * linking the ServerHandler library code into it. 00032 * 00033 * This exception does not however invalidate any other reasons why 00034 * the executable file might be covered by the GNU General Public License. 00035 * 00036 * This exception applies only to the code released by The Free 00037 * Software Foundation under the name ServerHandler. If you copy code 00038 * from other sources under the General Public License into a copy of 00039 * ServerHandler, as the General Public License permits, the exception 00040 * does not apply to the code that you add in this way. To avoid 00041 * misleading anyone as to the status of such modified files, you must 00042 * delete this exception notice from them. 00043 * 00044 * If you write modifications of your own for ServerHandler, it is your 00045 * choice whether to permit this exception to apply to your modifications. 00046 * If you do not wish that, delete this exception notice. 00047 */ 00048 00049 #ifndef GCC_SERVER_H 00050 #define GCC_SERVER_H 00051 00052 #include <stdio.h> 00053 #ifdef HAVE_UNISTD_H 00054 #include <unistd.h> 00055 #endif 00056 00057 #include "fixlib.h" 00058 00059 /* 00060 * Dual pipe opening of a child process 00061 */ 00062 00063 typedef struct 00064 { 00065 int read_fd; 00066 int write_fd; 00067 } t_fd_pair; 00068 00069 typedef struct 00070 { 00071 FILE *pf_read; /* parent read fp */ 00072 FILE *pf_write; /* parent write fp */ 00073 } t_pf_pair; 00074 00075 char *run_shell PARAMS (( const char *pzCmd)); 00076 pid_t proc2_fopen PARAMS (( t_pf_pair * p_pair, tCC ** pp_args)); 00077 pid_t proc2_open PARAMS (( t_fd_pair * p_pair, tCC ** pp_args)); 00078 int chain_open PARAMS (( int in_fd, tCC ** pp_args, 00079 pid_t * p_child)); 00080 void close_server PARAMS (( void )); 00081 00082 #endif /* ! GCC_SERVER_H */
1.5.6