23 #if defined (HAVE_CONFIG_H) 36 #if defined (HAVE_UNISTD_H) 37 # if defined (HAVE_SYS_TYPES_H) 38 # include <sys/types.h> 55 #if ! defined (SHELL_PATH) 56 # define SHELL_PATH "/bin/sh" 62 #if (! (defined (__CYGWIN__) || defined (__MINGW32__) || defined (_MSC_VER)) \ 63 && defined (HAVE_UNISTD_H)) 69 #if ! defined (BUFSIZ) 76 #if defined (__CYGWIN__) || defined (__MINGW32__) || defined (_MSC_VER) 92 if (
mode & std::ios::out)
93 ::setvbuf (
f, 0, _IOLBF,
BUFSIZ);
97 #elif defined (HAVE_UNISTD_H) 101 volatile int child_std_end = (
mode & std::ios::in) ? 1 : 0;
103 volatile int parent_end, child_end;
111 if (
mode & std::ios::in)
113 parent_end = pipe_fds[0];
114 child_end = pipe_fds[1];
118 parent_end = pipe_fds[1];
119 child_end = pipe_fds[0];
128 if (child_end != child_std_end)
134 while (octave_procbuf_list)
136 FILE *fp = octave_procbuf_list->
f;
144 octave_procbuf_list = octave_procbuf_list->
next;
160 f = (::fdopen (parent_end, (
mode & std::ios::in) ?
"r" :
"w"));
162 if (
mode & std::ios::out)
163 ::setvbuf (
f,
nullptr, _IOLBF,
BUFSIZ);
167 next = octave_procbuf_list;
168 octave_procbuf_list =
this;
182 #if defined (__CYGWIN__) || defined (__MINGW32__) || defined (_MSC_VER) 194 #elif defined (HAVE_UNISTD_H) 222 while (wait_pid == -1 && errno == EINTR);
FILE * octave_popen(const char *command, const char *mode)
int octave_pclose(FILE *f)
octave_procbuf * open(const char *command, int mode)
Return the CPU time used by your Octave session The first output is the total time spent executing your process and is equal to the sum of second and third which are the number of CPU seconds spent executing in user mode and the number of CPU seconds spent executing in system mode
to define functions rather than attempting to enter them directly on the command line The block of commands is executed as soon as you exit the editor To avoid executing any simply delete all the lines from the buffer before leaving the editor When invoked with no edit the previously executed command
pid_t waitpid(pid_t pid, int *status, int options)
OCTAVE_EXPORT octave_value_list or both For fclose
octave_procbuf * close(void)
int octave_close_wrapper(int fd)
pid_t fork(std::string &msg)
int octave_dup2_wrapper(int fd1, int fd2)