Lines 1-64
Link Here
|
1 |
/************************************************************************* |
1 |
/* RCS $Id: runargv.c,v 1.6 2003/01/04 13:02:44 waratah Exp $ |
2 |
* |
|
|
3 |
* $RCSfile: runargv.c,v $ |
4 |
* |
5 |
* $Revision: 1.5.4.1.2.4 $ |
6 |
* |
7 |
* last change: $Author: vq $ $Date: 2003/02/13 14:12:47 $ |
8 |
* |
9 |
* The Contents of this file are made available subject to the terms of |
10 |
* either of the following licenses |
11 |
* |
12 |
* - GNU Lesser General Public License Version 2.1 |
13 |
* - Sun Industry Standards Source License Version 1.1 |
14 |
* |
15 |
* Sun Microsystems Inc., October, 2000 |
16 |
* |
17 |
* GNU Lesser General Public License Version 2.1 |
18 |
* ============================================= |
19 |
* Copyright 2000 by Sun Microsystems, Inc. |
20 |
* 901 San Antonio Road, Palo Alto, CA 94303, USA |
21 |
* |
22 |
* This library is free software; you can redistribute it and/or |
23 |
* modify it under the terms of the GNU Lesser General Public |
24 |
* License version 2.1, as published by the Free Software Foundation. |
25 |
* |
26 |
* This library is distributed in the hope that it will be useful, |
27 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
28 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
29 |
* Lesser General Public License for more details. |
30 |
* |
31 |
* You should have received a copy of the GNU Lesser General Public |
32 |
* License along with this library; if not, write to the Free Software |
33 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
34 |
* MA 02111-1307 USA |
35 |
* |
36 |
* |
37 |
* Sun Industry Standards Source License Version 1.1 |
38 |
* ================================================= |
39 |
* The contents of this file are subject to the Sun Industry Standards |
40 |
* Source License Version 1.1 (the "License"); You may not use this file |
41 |
* except in compliance with the License. You may obtain a copy of the |
42 |
* License at http://www.openoffice.org/license.html. |
43 |
* |
44 |
* Software provided under this License is provided on an "AS IS" basis, |
45 |
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, |
46 |
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, |
47 |
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. |
48 |
* See the License for the specific provisions governing your rights and |
49 |
* obligations concerning the Software. |
50 |
* |
51 |
* The Initial Developer of the Original Code is: Sun Microsystems, Inc. |
52 |
* |
53 |
* Copyright: 2000 by Sun Microsystems, Inc. |
54 |
* |
55 |
* All Rights Reserved. |
56 |
* |
57 |
* Contributor(s): _______________________________________ |
58 |
* |
59 |
* |
60 |
************************************************************************/ |
61 |
/* |
62 |
-- |
2 |
-- |
63 |
-- SYNOPSIS |
3 |
-- SYNOPSIS |
64 |
-- Invoke a sub process. |
4 |
-- Invoke a sub process. |
Lines 84-94
Link Here
|
84 |
*/ |
24 |
*/ |
85 |
|
25 |
|
86 |
#include <signal.h> |
26 |
#include <signal.h> |
87 |
#if !defined(__APPLE__) && !defined(_MSC_VER) |
27 |
#ifdef HAVE_WAIT_H |
88 |
# if defined(__FreeBSD__) || defined(__CYGWIN__) |
|
|
89 |
# include <sys/wait.h> |
90 |
# else |
91 |
# include <wait.h> |
28 |
# include <wait.h> |
|
|
29 |
#else |
30 |
# ifdef HAVE_SYS_WAIT_H |
31 |
# include <sys/wait.h> |
92 |
# endif |
32 |
# endif |
93 |
#endif |
33 |
#endif |
94 |
|
34 |
|
Lines 170-192
int last;
Link Here
|
170 |
int shell; |
110 |
int shell; |
171 |
char *cmd; |
111 |
char *cmd; |
172 |
{ |
112 |
{ |
173 |
|
|
|
174 |
#if !defined(__CYGWIN__) |
175 |
extern int errno; |
176 |
#ifndef __APPLE__ |
177 |
#ifdef arm32 |
178 |
extern const char * const sys_errlist[]; |
179 |
#else |
180 |
#if defined(linux) || defined(__FreeBSD__) |
181 |
extern const char * const sys_errlist[]; |
182 |
#else |
183 |
extern char *sys_errlist[]; |
184 |
#endif |
185 |
#endif |
186 |
#endif |
187 |
#else /* __CYGWIN__ */ |
188 |
#define sys_errlist _sys_errlist |
189 |
#endif |
190 |
int pid; |
113 |
int pid; |
191 |
char **argv; |
114 |
char **argv; |
192 |
|
115 |
|