GNU Octave  6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
syscalls.cc File Reference
#include <ctime>
#include <cstdio>
#include <cstring>
#include "cmd-hist.h"
#include "fcntl-wrappers.h"
#include "file-ops.h"
#include "file-stat.h"
#include "lo-utils.h"
#include "oct-env.h"
#include "oct-syscalls.h"
#include "oct-uname.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "event-manager.h"
#include "input.h"
#include "interpreter.h"
#include "oct-hist.h"
#include "oct-map.h"
#include "oct-stdstrm.h"
#include "oct-stream.h"
#include "ovl.h"
#include "sysdep.h"
#include "utils.h"
#include "variables.h"
Include dependency graph for syscalls.cc:

Go to the source code of this file.

Functions

static octave_value const_value (const octave_value_list &args, int val)
 
static int convert (int x, int ibase, int obase)
 
OCTAVE_EXPORT octave_value_list Fcanonicalize_file_name (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fdup2 (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fexec (octave::interpreter &interp, 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 (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Ffork (octave::interpreter &interp, 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 (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Fpopen2 (octave::interpreter &interp, 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 (octave::interpreter &interp, const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Funame (const octave_value_list &args, int)
 
OCTAVE_EXPORT octave_value_list Funlink (octave::interpreter &interp, 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 octave::sys::base_file_stat &fs)
 
static octave_value_list mk_stat_result (const octave::sys::base_file_stat &fs)
 

Function Documentation

◆ const_value()

◆ convert()

static int convert ( int  x,
int  ibase,
int  obase 
)
static

Definition at line 654 of file syscalls.cc.

References error(), retval, and x.

Referenced by Fmkfifo().

◆ Fcanonicalize_file_name()

OCTAVE_EXPORT octave_value_list Fcanonicalize_file_name ( const octave_value_list args,
int   
)

Definition at line 1340 of file syscalls.cc.

References octave::sys::canonicalize_file_name(), name, ovl(), and print_usage().

◆ Fdup2()

OCTAVE_EXPORT octave_value_list Fdup2 ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ Fexec()

◆ FF_DUPFD()

OCTAVE_EXPORT octave_value_list FF_DUPFD ( const octave_value_list args,
int   
)

Definition at line 1369 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_f_dupfd_wrapper().

◆ FF_GETFD()

OCTAVE_EXPORT octave_value_list FF_GETFD ( const octave_value_list args,
int   
)

Definition at line 1385 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_f_getfd_wrapper().

◆ FF_GETFL()

OCTAVE_EXPORT octave_value_list FF_GETFL ( const octave_value_list args,
int   
)

Definition at line 1401 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_f_getfl_wrapper().

◆ FF_SETFD()

OCTAVE_EXPORT octave_value_list FF_SETFD ( const octave_value_list args,
int   
)

Definition at line 1417 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_f_setfd_wrapper().

◆ FF_SETFL()

OCTAVE_EXPORT octave_value_list FF_SETFL ( const octave_value_list args,
int   
)

Definition at line 1433 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_f_setfl_wrapper().

◆ Ffcntl()

OCTAVE_EXPORT octave_value_list Ffcntl ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ Ffork()

OCTAVE_EXPORT octave_value_list Ffork ( octave::interpreter interp,
const octave_value_list args,
int   
)

Definition at line 485 of file syscalls.cc.

References error(), octave::sys::fork(), ovl(), and print_usage().

◆ Fgetegid()

OCTAVE_EXPORT octave_value_list Fgetegid ( const octave_value_list args,
int   
)

Definition at line 547 of file syscalls.cc.

References octave::sys::getegid(), ovl(), and print_usage().

◆ Fgeteuid()

OCTAVE_EXPORT octave_value_list Fgeteuid ( const octave_value_list args,
int   
)

Definition at line 573 of file syscalls.cc.

References octave::sys::geteuid(), ovl(), and print_usage().

◆ Fgetgid()

OCTAVE_EXPORT octave_value_list Fgetgid ( const octave_value_list args,
int   
)

Definition at line 560 of file syscalls.cc.

References octave::sys::getgid(), ovl(), and print_usage().

◆ Fgethostname()

OCTAVE_EXPORT octave_value_list Fgethostname ( const octave_value_list args,
int   
)

Definition at line 1018 of file syscalls.cc.

References octave::sys::env::get_host_name(), ovl(), and print_usage().

◆ Fgetpgrp()

OCTAVE_EXPORT octave_value_list Fgetpgrp ( const octave_value_list args,
int   
)

Definition at line 504 of file syscalls.cc.

References octave::sys::getpgrp(), ovl(), and print_usage().

◆ Fgetpid()

OCTAVE_EXPORT octave_value_list Fgetpid ( const octave_value_list args,
int   
)

Definition at line 521 of file syscalls.cc.

References octave::sys::getpid(), ovl(), and print_usage().

◆ Fgetppid()

OCTAVE_EXPORT octave_value_list Fgetppid ( const octave_value_list args,
int   
)

Definition at line 534 of file syscalls.cc.

References octave::sys::getppid(), ovl(), and print_usage().

◆ Fgetuid()

OCTAVE_EXPORT octave_value_list Fgetuid ( const octave_value_list args,
int   
)

Definition at line 586 of file syscalls.cc.

References octave::sys::getuid(), ovl(), and print_usage().

◆ Fkill()

OCTAVE_EXPORT octave_value_list Fkill ( const octave_value_list args,
int   
)

Definition at line 614 of file syscalls.cc.

References octave::sys::kill(), ovl(), and print_usage().

◆ Flstat()

OCTAVE_EXPORT octave_value_list Flstat ( const octave_value_list args,
int   
)

Definition at line 639 of file syscalls.cc.

References mk_stat_result(), and print_usage().

◆ Fmkfifo()

OCTAVE_EXPORT octave_value_list Fmkfifo ( const octave_value_list args,
int   
)

Definition at line 692 of file syscalls.cc.

References convert(), error(), octave::sys::mkfifo(), name, ovl(), and print_usage().

◆ FO_APPEND()

OCTAVE_EXPORT octave_value_list FO_APPEND ( const octave_value_list args,
int   
)

Definition at line 1452 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_o_append_wrapper().

◆ FO_ASYNC()

OCTAVE_EXPORT octave_value_list FO_ASYNC ( const octave_value_list args,
int   
)

Definition at line 1470 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_o_async_wrapper().

◆ FO_CREAT()

OCTAVE_EXPORT octave_value_list FO_CREAT ( const octave_value_list args,
int   
)

Definition at line 1489 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_o_creat_wrapper().

◆ FO_EXCL()

OCTAVE_EXPORT octave_value_list FO_EXCL ( const octave_value_list args,
int   
)

Definition at line 1507 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_o_excl_wrapper().

◆ FO_NONBLOCK()

OCTAVE_EXPORT octave_value_list FO_NONBLOCK ( const octave_value_list args,
int   
)

Definition at line 1526 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_o_nonblock_wrapper().

◆ FO_RDONLY()

OCTAVE_EXPORT octave_value_list FO_RDONLY ( const octave_value_list args,
int   
)

Definition at line 1544 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_o_rdonly_wrapper().

◆ FO_RDWR()

OCTAVE_EXPORT octave_value_list FO_RDWR ( const octave_value_list args,
int   
)

Definition at line 1563 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_o_rdwr_wrapper().

◆ FO_SYNC()

OCTAVE_EXPORT octave_value_list FO_SYNC ( const octave_value_list args,
int   
)

Definition at line 1581 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_o_sync_wrapper().

◆ FO_TRUNC()

OCTAVE_EXPORT octave_value_list FO_TRUNC ( const octave_value_list args,
int   
)

Definition at line 1600 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_o_trunc_wrapper().

◆ FO_WRONLY()

OCTAVE_EXPORT octave_value_list FO_WRONLY ( const octave_value_list args,
int   
)

Definition at line 1618 of file syscalls.cc.

References const_value(), err_disabled_feature(), and octave_o_wronly_wrapper().

◆ Fpipe()

OCTAVE_EXPORT octave_value_list Fpipe ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ Fpopen2()

◆ FS_ISBLK()

OCTAVE_EXPORT octave_value_list FS_ISBLK ( const octave_value_list args,
int   
)

Definition at line 950 of file syscalls.cc.

References octave::sys::base_file_stat::is_blk(), ovl(), and print_usage().

◆ FS_ISCHR()

OCTAVE_EXPORT octave_value_list FS_ISCHR ( const octave_value_list args,
int   
)

Definition at line 932 of file syscalls.cc.

References octave::sys::base_file_stat::is_chr(), ovl(), and print_usage().

◆ FS_ISDIR()

OCTAVE_EXPORT octave_value_list FS_ISDIR ( const octave_value_list args,
int   
)

Definition at line 914 of file syscalls.cc.

References octave::sys::base_file_stat::is_dir(), ovl(), and print_usage().

◆ FS_ISFIFO()

OCTAVE_EXPORT octave_value_list FS_ISFIFO ( const octave_value_list args,
int   
)

Definition at line 968 of file syscalls.cc.

References octave::sys::base_file_stat::is_fifo(), ovl(), and print_usage().

◆ FS_ISLNK()

OCTAVE_EXPORT octave_value_list FS_ISLNK ( const octave_value_list args,
int   
)

Definition at line 986 of file syscalls.cc.

References octave::sys::base_file_stat::is_lnk(), ovl(), and print_usage().

◆ FS_ISREG()

OCTAVE_EXPORT octave_value_list FS_ISREG ( const octave_value_list args,
int   
)

Definition at line 896 of file syscalls.cc.

References octave::sys::base_file_stat::is_reg(), ovl(), and print_usage().

◆ FS_ISSOCK()

OCTAVE_EXPORT octave_value_list FS_ISSOCK ( const octave_value_list args,
int   
)

Definition at line 1004 of file syscalls.cc.

References octave::sys::base_file_stat::is_sock(), ovl(), and print_usage().

◆ Fstat()

OCTAVE_EXPORT octave_value_list Fstat ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ Funame()

◆ Funlink()

OCTAVE_EXPORT octave_value_list Funlink ( octave::interpreter interp,
const octave_value_list args,
int   
)

◆ Fwaitpid()

OCTAVE_EXPORT octave_value_list Fwaitpid ( const octave_value_list args,
int   
)

Definition at line 1169 of file syscalls.cc.

References ovl(), print_usage(), and octave::sys::waitpid().

Referenced by gnuplot_graphics_toolkit::send_quit().

◆ FWCONTINUE()

OCTAVE_EXPORT octave_value_list FWCONTINUE ( const octave_value_list args,
int   
)

Definition at line 1665 of file syscalls.cc.

References const_value(), and octave::sys::wcontinue().

◆ FWCOREDUMP()

OCTAVE_EXPORT octave_value_list FWCOREDUMP ( const octave_value_list args,
int   
)

Definition at line 1269 of file syscalls.cc.

References ovl(), print_usage(), and octave::sys::wcoredump().

◆ FWEXITSTATUS()

OCTAVE_EXPORT octave_value_list FWEXITSTATUS ( const octave_value_list args,
int   
)

Definition at line 1215 of file syscalls.cc.

References ovl(), print_usage(), and octave::sys::wexitstatus().

◆ FWIFCONTINUED()

OCTAVE_EXPORT octave_value_list FWIFCONTINUED ( const octave_value_list args,
int   
)

Definition at line 1322 of file syscalls.cc.

References ovl(), print_usage(), and octave::sys::wifcontinued().

◆ FWIFEXITED()

OCTAVE_EXPORT octave_value_list FWIFEXITED ( const octave_value_list args,
int   
)

Definition at line 1197 of file syscalls.cc.

References ovl(), print_usage(), and octave::sys::wifexited().

◆ FWIFSIGNALED()

OCTAVE_EXPORT octave_value_list FWIFSIGNALED ( const octave_value_list args,
int   
)

Definition at line 1231 of file syscalls.cc.

References ovl(), print_usage(), and octave::sys::wifsignaled().

◆ FWIFSTOPPED()

OCTAVE_EXPORT octave_value_list FWIFSTOPPED ( const octave_value_list args,
int   
)

Definition at line 1288 of file syscalls.cc.

References ovl(), print_usage(), and octave::sys::wifstopped().

◆ FWNOHANG()

OCTAVE_EXPORT octave_value_list FWNOHANG ( const octave_value_list args,
int   
)

Definition at line 1637 of file syscalls.cc.

References const_value(), and octave::sys::wnohang().

◆ FWSTOPSIG()

OCTAVE_EXPORT octave_value_list FWSTOPSIG ( const octave_value_list args,
int   
)

Definition at line 1306 of file syscalls.cc.

References ovl(), print_usage(), and octave::sys::wstopsig().

◆ FWTERMSIG()

OCTAVE_EXPORT octave_value_list FWTERMSIG ( const octave_value_list args,
int   
)

Definition at line 1249 of file syscalls.cc.

References ovl(), print_usage(), and octave::sys::wtermsig().

◆ FWUNTRACED()

OCTAVE_EXPORT octave_value_list FWUNTRACED ( const octave_value_list args,
int   
)

Definition at line 1651 of file syscalls.cc.

References const_value(), and octave::sys::wuntraced().

◆ mk_stat_map()

◆ mk_stat_result()

static octave_value_list mk_stat_result ( const octave::sys::base_file_stat fs)
static

Definition at line 104 of file syscalls.cc.

References octave::sys::base_file_stat::error(), mk_stat_map(), and ovl().

Referenced by Flstat(), and Fstat().