GNU Octave  4.0.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Macros | Functions
syscalls.cc File Reference
#include <cstdio>
#include <cstring>
#include <sys/types.h>
#include <unistd.h>
#include <fcntl.h>
#include "cmd-hist.h"
#include "file-ops.h"
#include "file-stat.h"
#include "oct-env.h"
#include "oct-syscalls.h"
#include "oct-uname.h"
#include "defun.h"
#include "error.h"
#include "gripes.h"
#include "lo-utils.h"
#include "oct-hist.h"
#include "oct-map.h"
#include "oct-obj.h"
#include "oct-stdstrm.h"
#include "oct-stream.h"
#include "sysdep.h"
#include "utils.h"
#include "variables.h"
#include "input.h"
Include dependency graph for syscalls.cc:

Go to the source code of this file.

Macros

#define WCONTINUE   0
 
#define WNOHANG   0
 
#define WUNTRACED   0
 

Functions

static octave_value const_value (const octave_value_list &args, int val)
 
OCTAVE_EXPORT octave_value_list Fcanonicalize_file_name (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fdup2 (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fexec (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FF_DUPFD (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FF_GETFD (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FF_GETFL (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FF_SETFD (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FF_SETFL (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Ffcntl (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Ffork (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fgetegid (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fgeteuid (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fgetgid (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fgethostname (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fgetpgrp (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fgetpid (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fgetppid (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fgetuid (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fkill (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Flstat (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fmkfifo (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FO_APPEND (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FO_ASYNC (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FO_CREAT (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FO_EXCL (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FO_NONBLOCK (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FO_RDONLY (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FO_RDWR (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FO_SYNC (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FO_TRUNC (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FO_WRONLY (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fpipe (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fpopen2 (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FS_ISBLK (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FS_ISCHR (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FS_ISDIR (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FS_ISFIFO (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FS_ISLNK (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FS_ISREG (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FS_ISSOCK (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fstat (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Funame (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Funlink (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fwaitpid (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWCONTINUE (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWCOREDUMP (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWEXITSTATUS (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWIFCONTINUED (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWIFEXITED (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWIFSIGNALED (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWIFSTOPPED (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWNOHANG (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWSTOPSIG (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWTERMSIG (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list FWUNTRACED (const octave_value_list &args, int)
 
static octave_scalar_map mk_stat_map (const base_file_stat &fs)
 
static octave_value_list mk_stat_result (const base_file_stat &fs)
 

Macro Definition Documentation

#define WCONTINUE   0

Definition at line 1970 of file syscalls.cc.

Referenced by FWCONTINUE().

#define WNOHANG   0

Definition at line 1938 of file syscalls.cc.

Referenced by FWNOHANG(), and octave_child_list::octave_child_list_rep::wait().

#define WUNTRACED   0

Definition at line 1954 of file syscalls.cc.

Referenced by FWUNTRACED().

Function Documentation

static octave_value const_value ( const octave_value_list args,
int  val 
)
static
OCTAVE_EXPORT octave_value_list Fcanonicalize_file_name ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fdup2 ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fexec ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FF_DUPFD ( const octave_value_list args,
int   
)

Definition at line 1698 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FF_GETFD ( const octave_value_list args,
int   
)

Definition at line 1714 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FF_GETFL ( const octave_value_list args,
int   
)

Definition at line 1730 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FF_SETFD ( const octave_value_list args,
int   
)

Definition at line 1746 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FF_SETFL ( const octave_value_list args,
int   
)

Definition at line 1762 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Ffcntl ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Ffork ( const octave_value_list args,
int   
)

Definition at line 576 of file syscalls.cc.

References octave_syscalls::fork(), octave_value_list::length(), and print_usage().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Fgetegid ( const octave_value_list args,
int   
)

Definition at line 669 of file syscalls.cc.

References octave_syscalls::getegid(), octave_value::length(), and print_usage().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Fgeteuid ( const octave_value_list args,
int   
)

Definition at line 707 of file syscalls.cc.

References octave_syscalls::geteuid(), octave_value::length(), and print_usage().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Fgetgid ( const octave_value_list args,
int   
)

Definition at line 688 of file syscalls.cc.

References octave_syscalls::getgid(), octave_value::length(), and print_usage().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Fgethostname ( const octave_value_list args,
int   
)

Definition at line 1251 of file syscalls.cc.

References octave_env::get_host_name(), and print_usage().

OCTAVE_EXPORT octave_value_list Fgetpgrp ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fgetpid ( const octave_value_list args,
int   
)

Definition at line 631 of file syscalls.cc.

References octave_syscalls::getpid(), octave_value::length(), and print_usage().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Fgetppid ( const octave_value_list args,
int   
)

Definition at line 650 of file syscalls.cc.

References octave_syscalls::getppid(), octave_value::length(), and print_usage().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Fgetuid ( const octave_value_list args,
int   
)

Definition at line 726 of file syscalls.cc.

References octave_syscalls::getuid(), octave_value::length(), and print_usage().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Fkill ( const octave_value_list args,
int   
)

Definition at line 760 of file syscalls.cc.

References error_state, octave_syscalls::kill(), and print_usage().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Flstat ( const octave_value_list args,
int   
)

Definition at line 801 of file syscalls.cc.

References error_state, mk_stat_result(), and print_usage().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Fmkfifo ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FO_APPEND ( const octave_value_list args,
int   
)

Definition at line 1779 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FO_ASYNC ( const octave_value_list args,
int   
)

Definition at line 1795 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FO_CREAT ( const octave_value_list args,
int   
)

Definition at line 1812 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FO_EXCL ( const octave_value_list args,
int   
)

Definition at line 1828 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FO_NONBLOCK ( const octave_value_list args,
int   
)

Definition at line 1845 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FO_RDONLY ( const octave_value_list args,
int   
)

Definition at line 1861 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FO_RDWR ( const octave_value_list args,
int   
)

Definition at line 1878 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FO_SYNC ( const octave_value_list args,
int   
)

Definition at line 1894 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FO_TRUNC ( const octave_value_list args,
int   
)

Definition at line 1911 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FO_WRONLY ( const octave_value_list args,
int   
)

Definition at line 1927 of file syscalls.cc.

References const_value(), error(), and octave_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Fpipe ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fpopen2 ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FS_ISBLK ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FS_ISCHR ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FS_ISDIR ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FS_ISFIFO ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FS_ISLNK ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FS_ISREG ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FS_ISSOCK ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Fstat ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Funame ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list Funlink ( const octave_value_list args,
int   
)

Definition at line 1321 of file syscalls.cc.

References error(), octave_value_list::length(), octave_unlink(), and print_usage().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list Fwaitpid ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FWCONTINUE ( const octave_value_list args,
int   
)

Definition at line 1980 of file syscalls.cc.

References const_value(), and WCONTINUE.

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FWCOREDUMP ( const octave_value_list args,
int   
)

Definition at line 1549 of file syscalls.cc.

References octave_wait::coredump(), error(), error_state, and octave_value::int_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FWEXITSTATUS ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FWIFCONTINUED ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FWIFEXITED ( const octave_value_list args,
int   
)

Definition at line 1449 of file syscalls.cc.

References error(), error_state, octave_wait::ifexited(), and octave_value::int_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FWIFSIGNALED ( const octave_value_list args,
int   
)
OCTAVE_EXPORT octave_value_list FWIFSTOPPED ( const octave_value_list args,
int   
)

Definition at line 1575 of file syscalls.cc.

References error(), error_state, octave_wait::ifstopped(), and octave_value::int_value().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FWNOHANG ( const octave_value_list args,
int   
)

Definition at line 1948 of file syscalls.cc.

References const_value(), and WNOHANG.

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FWSTOPSIG ( const octave_value_list args,
int   
)

Definition at line 1600 of file syscalls.cc.

References error(), error_state, octave_value::int_value(), and octave_wait::stopsig().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FWTERMSIG ( const octave_value_list args,
int   
)

Definition at line 1522 of file syscalls.cc.

References error(), error_state, octave_value::int_value(), and octave_wait::termsig().

Referenced by install_syscalls_fcns().

OCTAVE_EXPORT octave_value_list FWUNTRACED ( const octave_value_list args,
int   
)

Definition at line 1964 of file syscalls.cc.

References const_value(), and WUNTRACED.

Referenced by install_syscalls_fcns().

static octave_scalar_map mk_stat_map ( const base_file_stat fs)
static
static octave_value_list mk_stat_result ( const base_file_stat fs)
static

Definition at line 92 of file syscalls.cc.

References base_file_stat::error(), mk_stat_map(), and octave_value().

Referenced by Flstat(), and Fstat().