oct-syscalls.h

Go to the documentation of this file.
00001 /*
00002 
00003 Copyright (C) 1996-2012 John W. Eaton
00004 
00005 This file is part of Octave.
00006 
00007 Octave is free software; you can redistribute it and/or modify it
00008 under the terms of the GNU General Public License as published by the
00009 Free Software Foundation; either version 3 of the License, or (at your
00010 option) any later version.
00011 
00012 Octave is distributed in the hope that it will be useful, but WITHOUT
00013 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00014 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00015 for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with Octave; see the file COPYING.  If not, see
00019 <http://www.gnu.org/licenses/>.
00020 
00021 */
00022 
00023 #if !defined (octave_syscalls_h)
00024 #define octave_syscalls_h 1
00025 
00026 #include <string>
00027 
00028 class string_vector;
00029 
00030 #include <sys/types.h>
00031 
00032 struct
00033 OCTAVE_API
00034 octave_syscalls
00035 {
00036   static int dup2 (int, int);
00037   static int dup2 (int, int, std::string&);
00038 
00039   static int execvp (const std::string&, const string_vector&);
00040   static int execvp (const std::string&, const string_vector&, std::string&);
00041 
00042   static pid_t fork (std::string&);
00043   static pid_t vfork (std::string&);
00044 
00045   static pid_t getpgrp (std::string&);
00046 
00047   static pid_t getpid (void);
00048   static pid_t getppid (void);
00049 
00050   static gid_t getgid (void);
00051   static gid_t getegid (void);
00052 
00053   static uid_t getuid (void);
00054   static uid_t geteuid (void);
00055 
00056   static int pipe (int *);
00057   static int pipe (int *, std::string&);
00058 
00059   static pid_t waitpid (pid_t, int *status, int);
00060   static pid_t waitpid (pid_t, int *status, int, std::string&);
00061 
00062   static int kill (pid_t, int);
00063   static int kill (pid_t, int, std::string&);
00064 
00065   static pid_t popen2 (const std::string&, const string_vector&, bool, int *);
00066   static pid_t popen2 (const std::string&, const string_vector&, bool, int *, std::string&);
00067   static pid_t popen2 (const std::string&, const string_vector&, bool, int *, std::string&, bool &interactive);
00068 };
00069 
00070 #endif
00071 
00072 extern OCTAVE_API int octave_fcntl (int, int, long);
00073 extern OCTAVE_API int octave_fcntl (int, int, long, std::string&);
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines