2941
|
1 /* |
|
2 |
7017
|
3 Copyright (C) 1996, 1997, 1998, 2000, 2003, 2005, 2006, 2007 |
|
4 John W. Eaton |
2941
|
5 |
|
6 This file is part of Octave. |
|
7 |
|
8 Octave is free software; you can redistribute it and/or modify it |
|
9 under the terms of the GNU General Public License as published by the |
7016
|
10 Free Software Foundation; either version 3 of the License, or (at your |
|
11 option) any later version. |
2941
|
12 |
|
13 Octave is distributed in the hope that it will be useful, but WITHOUT |
|
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
|
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
|
16 for more details. |
|
17 |
|
18 You should have received a copy of the GNU General Public License |
7016
|
19 along with Octave; see the file COPYING. If not, see |
|
20 <http://www.gnu.org/licenses/>. |
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 #include <sys/types.h> |
|
32 |
|
33 struct |
6108
|
34 OCTAVE_API |
2941
|
35 octave_syscalls |
|
36 { |
|
37 static int dup2 (int, int); |
3504
|
38 static int dup2 (int, int, std::string&); |
2941
|
39 |
3504
|
40 static int execvp (const std::string&, const string_vector&); |
|
41 static int execvp (const std::string&, const string_vector&, std::string&); |
2941
|
42 |
3504
|
43 static pid_t fork (std::string&); |
|
44 static pid_t vfork (std::string&); |
2941
|
45 |
3504
|
46 static pid_t getpgrp (std::string&); |
2941
|
47 |
|
48 static pid_t getpid (void); |
|
49 static pid_t getppid (void); |
|
50 |
|
51 static gid_t getgid (void); |
|
52 static gid_t getegid (void); |
|
53 |
|
54 static uid_t getuid (void); |
|
55 static uid_t geteuid (void); |
|
56 |
|
57 static int pipe (int *); |
3504
|
58 static int pipe (int *, std::string&); |
2941
|
59 |
5453
|
60 static pid_t waitpid (pid_t, int *status, int); |
|
61 static pid_t waitpid (pid_t, int *status, int, std::string&); |
4294
|
62 |
|
63 static int kill (pid_t, int); |
|
64 static int kill (pid_t, int, std::string&); |
6321
|
65 |
|
66 static pid_t popen2 (const std::string&, const string_vector&, bool, int *); |
|
67 static pid_t popen2 (const std::string&, const string_vector&, bool, int *, std::string&); |
|
68 static pid_t popen2 (const std::string&, const string_vector&, bool, int *, std::string&, bool &interactive); |
2941
|
69 }; |
|
70 |
|
71 #endif |
10259
|
72 |
|
73 extern OCTAVE_API int octave_fcntl (int, int, long); |
|
74 extern OCTAVE_API int octave_fcntl (int, int, long, std::string&); |