00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #if !defined (octave_syscalls_h)
00025 #define octave_syscalls_h 1
00026
00027 #include <string>
00028
00029 class string_vector;
00030
00031 #ifdef HAVE_SYS_TYPES_H
00032 #include <sys/types.h>
00033 #endif
00034
00035 struct
00036 OCTAVE_API
00037 octave_syscalls
00038 {
00039 static int dup2 (int, int);
00040 static int dup2 (int, int, std::string&);
00041
00042 static int execvp (const std::string&, const string_vector&);
00043 static int execvp (const std::string&, const string_vector&, std::string&);
00044
00045 static int fcntl (int, int, long);
00046 static int fcntl (int, int, long, std::string&);
00047
00048 static pid_t fork (std::string&);
00049 static pid_t vfork (std::string&);
00050
00051 static pid_t getpgrp (std::string&);
00052
00053 static pid_t getpid (void);
00054 static pid_t getppid (void);
00055
00056 static gid_t getgid (void);
00057 static gid_t getegid (void);
00058
00059 static uid_t getuid (void);
00060 static uid_t geteuid (void);
00061
00062 static int pipe (int *);
00063 static int pipe (int *, std::string&);
00064
00065 static pid_t waitpid (pid_t, int *status, int);
00066 static pid_t waitpid (pid_t, int *status, int, std::string&);
00067
00068 static int kill (pid_t, int);
00069 static int kill (pid_t, int, std::string&);
00070
00071 static pid_t popen2 (const std::string&, const string_vector&, bool, int *);
00072 static pid_t popen2 (const std::string&, const string_vector&, bool, int *, std::string&);
00073 static pid_t popen2 (const std::string&, const string_vector&, bool, int *, std::string&, bool &interactive);
00074 };
00075
00076 #endif
00077
00078
00079
00080
00081
00082