GNU Octave  9.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
oct-syscalls.h
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 //
3 // Copyright (C) 1996-2024 The Octave Project Developers
4 //
5 // See the file COPYRIGHT.md in the top-level directory of this
6 // distribution or <https://octave.org/copyright/>.
7 //
8 // This file is part of Octave.
9 //
10 // Octave is free software: you can redistribute it and/or modify it
11 // under the terms of the GNU General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // Octave is distributed in the hope that it will be useful, but
16 // WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU General Public License for more details.
19 //
20 // You should have received a copy of the GNU General Public License
21 // along with Octave; see the file COPYING. If not, see
22 // <https://www.gnu.org/licenses/>.
23 //
24 ////////////////////////////////////////////////////////////////////////
25 
26 #if ! defined (octave_oct_syscalls_h)
27 #define octave_oct_syscalls_h 1
28 
29 #include "octave-config.h"
30 
31 #include <string>
32 
33 class string_vector;
34 
35 #include <sys/types.h>
36 
38 
40 
41 extern OCTAVE_API int dup2 (int, int);
42 extern OCTAVE_API int dup2 (int, int, std::string&);
43 
44 extern OCTAVE_API int execvp (const std::string&, const string_vector&);
45 extern OCTAVE_API int execvp (const std::string&, const string_vector&,
46  std::string&);
47 
48 extern OCTAVE_API pid_t fork (std::string&);
49 
50 extern OCTAVE_API pid_t vfork (std::string&);
51 
52 extern OCTAVE_API pid_t getpgrp (std::string&);
53 
54 extern OCTAVE_API pid_t getpid ();
55 
56 extern OCTAVE_API pid_t getppid ();
57 
58 extern OCTAVE_API gid_t getgid ();
59 
60 extern OCTAVE_API gid_t getegid ();
61 
62 extern OCTAVE_API uid_t getuid ();
63 
64 extern OCTAVE_API uid_t geteuid ();
65 
66 extern OCTAVE_API int pipe (int *);
67 extern OCTAVE_API int pipe (int *, std::string&);
68 
69 extern OCTAVE_API pid_t waitpid (pid_t, int *status, int);
70 extern OCTAVE_API pid_t waitpid (pid_t, int *status, int, std::string&);
71 
72 extern OCTAVE_API int wcontinue ();
73 
74 extern OCTAVE_API int wcoredump (int status);
75 
76 extern OCTAVE_API bool wifcontinued (int status);
77 
78 extern OCTAVE_API bool wifexited (int status);
79 
80 extern OCTAVE_API bool wifsignaled (int status);
81 
82 extern OCTAVE_API bool wifstopped (int status);
83 
84 extern OCTAVE_API int wexitstatus (int status);
85 
86 extern OCTAVE_API int wnohang ();
87 
88 extern OCTAVE_API int wstopsig (int status);
89 
90 extern OCTAVE_API int wtermsig (int status);
91 
92 extern OCTAVE_API int wuntraced ();
93 
94 extern OCTAVE_API int kill (pid_t, int);
95 extern OCTAVE_API int kill (pid_t, int, std::string&);
96 
97 extern OCTAVE_API pid_t
98 popen2 (const std::string&, const string_vector&, bool, int *);
99 
100 extern OCTAVE_API pid_t
101 popen2 (const std::string&, const string_vector&, bool, int *,
102  std::string&);
103 
104 extern OCTAVE_API int fcntl (int, int, long);
105 extern OCTAVE_API int fcntl (int, int, long, std::string&);
106 
107 OCTAVE_END_NAMESPACE(sys)
108 OCTAVE_END_NAMESPACE(octave)
109 
110 #endif
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
#define OCTAVE_API
Definition: main.cc:55
int dup2(int, int)
Definition: oct-syscalls.cc:52
int kill(pid_t, int)
bool wifexited(int status)
pid_t waitpid(pid_t, int *status, int)
int wstopsig(int status)
int pipe(int *)
pid_t popen2(const std::string &, const string_vector &, bool, int *)
pid_t getppid()
pid_t vfork(std::string &)
int wexitstatus(int status)
pid_t fork(std::string &)
Definition: oct-syscalls.cc:99
bool wifstopped(int status)
bool wifcontinued(int status)
bool wifsignaled(int status)
gid_t getegid()
int wtermsig(int status)
int wuntraced()
uid_t getuid()
gid_t getgid()
int execvp(const std::string &, const string_vector &)
Definition: oct-syscalls.cc:74
int wnohang()
int wcoredump(int status)
int fcntl(int, int, long)
pid_t getpgrp(std::string &)
pid_t getpid()
uid_t geteuid()
int wcontinue()