2941
|
1 /* |
|
2 |
|
3 Copyright (C) 1996, 1997 John W. Eaton |
|
4 |
|
5 This file is part of Octave. |
|
6 |
|
7 Octave is free software; you can redistribute it and/or modify it |
|
8 under the terms of the GNU General Public License as published by the |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
11 |
|
12 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
15 for more details. |
|
16 |
|
17 You should have received a copy of the GNU General Public License |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
2941
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_syscalls_h) |
|
25 #define octave_syscalls_h 1 |
|
26 |
|
27 #include <string> |
|
28 |
|
29 class string_vector; |
|
30 |
|
31 #ifdef HAVE_SYS_TYPES_H |
|
32 #include <sys/types.h> |
|
33 #endif |
|
34 |
|
35 struct |
6108
|
36 OCTAVE_API |
2941
|
37 octave_syscalls |
|
38 { |
|
39 static int dup2 (int, int); |
3504
|
40 static int dup2 (int, int, std::string&); |
2941
|
41 |
3504
|
42 static int execvp (const std::string&, const string_vector&); |
|
43 static int execvp (const std::string&, const string_vector&, std::string&); |
2941
|
44 |
|
45 static int fcntl (int, int, long); |
3504
|
46 static int fcntl (int, int, long, std::string&); |
2941
|
47 |
3504
|
48 static pid_t fork (std::string&); |
|
49 static pid_t vfork (std::string&); |
2941
|
50 |
3504
|
51 static pid_t getpgrp (std::string&); |
2941
|
52 |
|
53 static pid_t getpid (void); |
|
54 static pid_t getppid (void); |
|
55 |
|
56 static gid_t getgid (void); |
|
57 static gid_t getegid (void); |
|
58 |
|
59 static uid_t getuid (void); |
|
60 static uid_t geteuid (void); |
|
61 |
|
62 static int pipe (int *); |
3504
|
63 static int pipe (int *, std::string&); |
2941
|
64 |
5453
|
65 static pid_t waitpid (pid_t, int *status, int); |
|
66 static pid_t waitpid (pid_t, int *status, int, std::string&); |
4294
|
67 |
|
68 static int kill (pid_t, int); |
|
69 static int kill (pid_t, int, std::string&); |
6321
|
70 |
|
71 static pid_t popen2 (const std::string&, const string_vector&, bool, int *); |
|
72 static pid_t popen2 (const std::string&, const string_vector&, bool, int *, std::string&); |
|
73 static pid_t popen2 (const std::string&, const string_vector&, bool, int *, std::string&, bool &interactive); |
2941
|
74 }; |
|
75 |
|
76 #endif |
|
77 |
|
78 /* |
|
79 ;;; Local Variables: *** |
|
80 ;;; mode: C++ *** |
|
81 ;;; End: *** |
|
82 */ |