Mercurial > octave
comparison libinterp/corefcn/syscalls.cc @ 17787:175b392e91fe
Use GNU style coding conventions for code in libinterp/
* libinterp/corefcn/Cell.h, libinterp/corefcn/__contourc__.cc,
libinterp/corefcn/__dispatch__.cc, libinterp/corefcn/__lin_interpn__.cc,
libinterp/corefcn/__pchip_deriv__.cc, libinterp/corefcn/__qp__.cc,
libinterp/corefcn/balance.cc, libinterp/corefcn/besselj.cc,
libinterp/corefcn/betainc.cc, libinterp/corefcn/bitfcns.cc,
libinterp/corefcn/bsxfun.cc, libinterp/corefcn/c-file-ptr-stream.cc,
libinterp/corefcn/c-file-ptr-stream.h, libinterp/corefcn/cellfun.cc,
libinterp/corefcn/colloc.cc, libinterp/corefcn/comment-list.h,
libinterp/corefcn/conv2.cc, libinterp/corefcn/daspk.cc,
libinterp/corefcn/dasrt.cc, libinterp/corefcn/dassl.cc,
libinterp/corefcn/data.cc, libinterp/corefcn/debug.cc,
libinterp/corefcn/defaults.cc, libinterp/corefcn/defaults.in.h,
libinterp/corefcn/defun-int.h, libinterp/corefcn/defun.cc,
libinterp/corefcn/det.cc, libinterp/corefcn/dirfns.cc,
libinterp/corefcn/display.cc, libinterp/corefcn/dlmread.cc,
libinterp/corefcn/dot.cc, libinterp/corefcn/dynamic-ld.cc,
libinterp/corefcn/dynamic-ld.h, libinterp/corefcn/eig.cc,
libinterp/corefcn/ellipj.cc, libinterp/corefcn/error.cc,
libinterp/corefcn/error.h, libinterp/corefcn/event-queue.h,
libinterp/corefcn/fft.cc, libinterp/corefcn/fft2.cc, libinterp/corefcn/fftn.cc,
libinterp/corefcn/file-io.cc, libinterp/corefcn/filter.cc,
libinterp/corefcn/find.cc, libinterp/corefcn/gammainc.cc,
libinterp/corefcn/gcd.cc, libinterp/corefcn/getgrent.cc,
libinterp/corefcn/getpwent.cc, libinterp/corefcn/getrusage.cc,
libinterp/corefcn/givens.cc, libinterp/corefcn/gl-render.cc,
libinterp/corefcn/gl2ps-renderer.cc, libinterp/corefcn/gl2ps-renderer.h,
libinterp/corefcn/graphics.cc, libinterp/corefcn/graphics.in.h,
libinterp/corefcn/gripes.cc, libinterp/corefcn/gripes.h,
libinterp/corefcn/help.cc, libinterp/corefcn/hess.cc,
libinterp/corefcn/hex2num.cc, libinterp/corefcn/input.cc,
libinterp/corefcn/input.h, libinterp/corefcn/inv.cc,
libinterp/corefcn/jit-ir.h, libinterp/corefcn/jit-typeinfo.cc,
libinterp/corefcn/jit-typeinfo.h, libinterp/corefcn/jit-util.h,
libinterp/corefcn/kron.cc, libinterp/corefcn/load-path.cc,
libinterp/corefcn/load-path.h, libinterp/corefcn/load-save.cc,
libinterp/corefcn/load-save.h, libinterp/corefcn/lookup.cc,
libinterp/corefcn/ls-ascii-helper.cc, libinterp/corefcn/ls-hdf5.cc,
libinterp/corefcn/ls-hdf5.h, libinterp/corefcn/ls-mat-ascii.cc,
libinterp/corefcn/ls-mat-ascii.h, libinterp/corefcn/ls-mat4.cc,
libinterp/corefcn/ls-mat5.cc, libinterp/corefcn/ls-mat5.h,
libinterp/corefcn/ls-oct-ascii.cc, libinterp/corefcn/lsode.cc,
libinterp/corefcn/lu.cc, libinterp/corefcn/luinc.cc,
libinterp/corefcn/mappers.cc, libinterp/corefcn/matrix_type.cc,
libinterp/corefcn/max.cc, libinterp/corefcn/md5sum.cc,
libinterp/corefcn/mex.cc, libinterp/corefcn/mexproto.h,
libinterp/corefcn/mgorth.cc, libinterp/corefcn/mxarray.in.h,
libinterp/corefcn/nproc.cc, libinterp/corefcn/oct-hist.cc,
libinterp/corefcn/oct-lvalue.h, libinterp/corefcn/oct-map.cc,
libinterp/corefcn/oct-map.h, libinterp/corefcn/oct-obj.h,
libinterp/corefcn/oct-prcstrm.h, libinterp/corefcn/oct-stdstrm.h,
libinterp/corefcn/oct-stream.cc, libinterp/corefcn/oct-stream.h,
libinterp/corefcn/octave-link.cc, libinterp/corefcn/octave-link.h,
libinterp/corefcn/pager.cc, libinterp/corefcn/pinv.cc,
libinterp/corefcn/pr-output.cc, libinterp/corefcn/procstream.h,
libinterp/corefcn/profiler.cc, libinterp/corefcn/pt-jit.cc,
libinterp/corefcn/pt-jit.h, libinterp/corefcn/quad.cc,
libinterp/corefcn/quadcc.cc, libinterp/corefcn/qz.cc,
libinterp/corefcn/rand.cc, libinterp/corefcn/rcond.cc,
libinterp/corefcn/regexp.cc, libinterp/corefcn/schur.cc,
libinterp/corefcn/sighandlers.cc, libinterp/corefcn/sighandlers.h,
libinterp/corefcn/sparse-xdiv.cc, libinterp/corefcn/sparse-xdiv.h,
libinterp/corefcn/sparse-xpow.cc, libinterp/corefcn/sparse.cc,
libinterp/corefcn/spparms.cc, libinterp/corefcn/sqrtm.cc,
libinterp/corefcn/str2double.cc, libinterp/corefcn/strfind.cc,
libinterp/corefcn/strfns.cc, libinterp/corefcn/sub2ind.cc,
libinterp/corefcn/svd.cc, libinterp/corefcn/syl.cc,
libinterp/corefcn/symtab.cc, libinterp/corefcn/symtab.h,
libinterp/corefcn/syscalls.cc, libinterp/corefcn/sysdep.cc,
libinterp/corefcn/sysdep.h, libinterp/corefcn/time.cc,
libinterp/corefcn/toplev.cc, libinterp/corefcn/toplev.h,
libinterp/corefcn/tril.cc, libinterp/corefcn/txt-eng-ft.cc,
libinterp/corefcn/txt-eng-ft.h, libinterp/corefcn/txt-eng.h,
libinterp/corefcn/typecast.cc, libinterp/corefcn/urlwrite.cc,
libinterp/corefcn/utils.cc, libinterp/corefcn/variables.cc,
libinterp/corefcn/variables.h, libinterp/corefcn/xdiv.cc,
libinterp/corefcn/xdiv.h, libinterp/corefcn/xnorm.h, libinterp/corefcn/xpow.cc,
libinterp/corefcn/xpow.h, libinterp/corefcn/zfstream.cc,
libinterp/corefcn/zfstream.h, libinterp/dldfcn/__delaunayn__.cc,
libinterp/dldfcn/__dsearchn__.cc, libinterp/dldfcn/__eigs__.cc,
libinterp/dldfcn/__fltk_uigetfile__.cc, libinterp/dldfcn/__glpk__.cc,
libinterp/dldfcn/__init_fltk__.cc, libinterp/dldfcn/__init_gnuplot__.cc,
libinterp/dldfcn/__magick_read__.cc, libinterp/dldfcn/__voronoi__.cc,
libinterp/dldfcn/amd.cc, libinterp/dldfcn/ccolamd.cc, libinterp/dldfcn/chol.cc,
libinterp/dldfcn/colamd.cc, libinterp/dldfcn/convhulln.cc,
libinterp/dldfcn/dmperm.cc, libinterp/dldfcn/fftw.cc, libinterp/dldfcn/qr.cc,
libinterp/dldfcn/symbfact.cc, libinterp/dldfcn/symrcm.cc,
libinterp/dldfcn/tsearch.cc, libinterp/octave-value/ov-base-diag.cc,
libinterp/octave-value/ov-base-diag.h, libinterp/octave-value/ov-base-int.cc,
libinterp/octave-value/ov-base-int.h, libinterp/octave-value/ov-base-mat.h,
libinterp/octave-value/ov-base-scalar.cc,
libinterp/octave-value/ov-base-scalar.h,
libinterp/octave-value/ov-base-sparse.cc,
libinterp/octave-value/ov-base-sparse.h, libinterp/octave-value/ov-base.cc,
libinterp/octave-value/ov-base.h, libinterp/octave-value/ov-bool-mat.cc,
libinterp/octave-value/ov-bool-mat.h, libinterp/octave-value/ov-bool-sparse.cc,
libinterp/octave-value/ov-bool-sparse.h, libinterp/octave-value/ov-bool.cc,
libinterp/octave-value/ov-bool.h, libinterp/octave-value/ov-builtin.cc,
libinterp/octave-value/ov-builtin.h, libinterp/octave-value/ov-cell.cc,
libinterp/octave-value/ov-cell.h, libinterp/octave-value/ov-ch-mat.cc,
libinterp/octave-value/ov-ch-mat.h, libinterp/octave-value/ov-class.cc,
libinterp/octave-value/ov-class.h, libinterp/octave-value/ov-colon.h,
libinterp/octave-value/ov-complex.cc, libinterp/octave-value/ov-complex.h,
libinterp/octave-value/ov-cx-diag.cc, libinterp/octave-value/ov-cx-diag.h,
libinterp/octave-value/ov-cx-mat.cc, libinterp/octave-value/ov-cx-mat.h,
libinterp/octave-value/ov-cx-sparse.cc, libinterp/octave-value/ov-cx-sparse.h,
libinterp/octave-value/ov-dld-fcn.h, libinterp/octave-value/ov-fcn-handle.cc,
libinterp/octave-value/ov-fcn-handle.h,
libinterp/octave-value/ov-fcn-inline.cc,
libinterp/octave-value/ov-fcn-inline.h, libinterp/octave-value/ov-fcn.h,
libinterp/octave-value/ov-float.cc, libinterp/octave-value/ov-float.h,
libinterp/octave-value/ov-flt-complex.cc,
libinterp/octave-value/ov-flt-complex.h,
libinterp/octave-value/ov-flt-cx-diag.cc,
libinterp/octave-value/ov-flt-cx-diag.h,
libinterp/octave-value/ov-flt-cx-mat.cc,
libinterp/octave-value/ov-flt-cx-mat.h,
libinterp/octave-value/ov-flt-re-diag.cc,
libinterp/octave-value/ov-flt-re-diag.h,
libinterp/octave-value/ov-flt-re-mat.cc,
libinterp/octave-value/ov-flt-re-mat.h, libinterp/octave-value/ov-int16.cc,
libinterp/octave-value/ov-int32.cc, libinterp/octave-value/ov-int64.cc,
libinterp/octave-value/ov-int8.cc, libinterp/octave-value/ov-intx.h,
libinterp/octave-value/ov-java.cc, libinterp/octave-value/ov-lazy-idx.h,
libinterp/octave-value/ov-mex-fcn.cc, libinterp/octave-value/ov-mex-fcn.h,
libinterp/octave-value/ov-null-mat.cc, libinterp/octave-value/ov-null-mat.h,
libinterp/octave-value/ov-oncleanup.cc, libinterp/octave-value/ov-perm.cc,
libinterp/octave-value/ov-perm.h, libinterp/octave-value/ov-range.cc,
libinterp/octave-value/ov-range.h, libinterp/octave-value/ov-re-diag.cc,
libinterp/octave-value/ov-re-diag.h, libinterp/octave-value/ov-re-mat.cc,
libinterp/octave-value/ov-re-mat.h, libinterp/octave-value/ov-re-sparse.cc,
libinterp/octave-value/ov-re-sparse.h, libinterp/octave-value/ov-scalar.cc,
libinterp/octave-value/ov-scalar.h, libinterp/octave-value/ov-str-mat.cc,
libinterp/octave-value/ov-str-mat.h, libinterp/octave-value/ov-struct.cc,
libinterp/octave-value/ov-struct.h, libinterp/octave-value/ov-type-conv.h,
libinterp/octave-value/ov-typeinfo.cc, libinterp/octave-value/ov-typeinfo.h,
libinterp/octave-value/ov-uint16.cc, libinterp/octave-value/ov-uint32.cc,
libinterp/octave-value/ov-uint64.cc, libinterp/octave-value/ov-uint8.cc,
libinterp/octave-value/ov-usr-fcn.cc, libinterp/octave-value/ov-usr-fcn.h,
libinterp/octave-value/ov.cc, libinterp/octave-value/ov.h, libinterp/octave.cc,
libinterp/operators/op-b-bm.cc, libinterp/operators/op-b-sbm.cc,
libinterp/operators/op-bm-b.cc, libinterp/operators/op-bm-bm.cc,
libinterp/operators/op-cdm-cdm.cc, libinterp/operators/op-chm.cc,
libinterp/operators/op-class.cc, libinterp/operators/op-cm-cm.cc,
libinterp/operators/op-cm-cs.cc, libinterp/operators/op-cm-s.cc,
libinterp/operators/op-cm-scm.cc, libinterp/operators/op-cm-sm.cc,
libinterp/operators/op-cs-cm.cc, libinterp/operators/op-cs-cs.cc,
libinterp/operators/op-cs-scm.cc, libinterp/operators/op-cs-sm.cc,
libinterp/operators/op-dm-dm.cc, libinterp/operators/op-dm-scm.cc,
libinterp/operators/op-double-conv.cc, libinterp/operators/op-fcdm-fcdm.cc,
libinterp/operators/op-fcm-fcm.cc, libinterp/operators/op-fcm-fcs.cc,
libinterp/operators/op-fcm-fm.cc, libinterp/operators/op-fcm-fs.cc,
libinterp/operators/op-fcs-fcm.cc, libinterp/operators/op-fcs-fcs.cc,
libinterp/operators/op-fcs-fm.cc, libinterp/operators/op-fcs-fs.cc,
libinterp/operators/op-fdm-fdm.cc, libinterp/operators/op-float-conv.cc,
libinterp/operators/op-fm-fcm.cc, libinterp/operators/op-fm-fcs.cc,
libinterp/operators/op-fm-fm.cc, libinterp/operators/op-fm-fs.cc,
libinterp/operators/op-fs-fcm.cc, libinterp/operators/op-fs-fcs.cc,
libinterp/operators/op-fs-fm.cc, libinterp/operators/op-fs-fs.cc,
libinterp/operators/op-m-cm.cc, libinterp/operators/op-m-cs.cc,
libinterp/operators/op-m-m.cc, libinterp/operators/op-m-s.cc,
libinterp/operators/op-m-scm.cc, libinterp/operators/op-m-sm.cc,
libinterp/operators/op-pm-scm.cc, libinterp/operators/op-range.cc,
libinterp/operators/op-s-cm.cc, libinterp/operators/op-s-cs.cc,
libinterp/operators/op-s-scm.cc, libinterp/operators/op-sbm-b.cc,
libinterp/operators/op-sbm-bm.cc, libinterp/operators/op-sbm-sbm.cc,
libinterp/operators/op-scm-cm.cc, libinterp/operators/op-scm-cs.cc,
libinterp/operators/op-scm-m.cc, libinterp/operators/op-scm-s.cc,
libinterp/operators/op-scm-scm.cc, libinterp/operators/op-scm-sm.cc,
libinterp/operators/op-sm-cm.cc, libinterp/operators/op-sm-m.cc,
libinterp/operators/op-sm-s.cc, libinterp/operators/op-sm-scm.cc,
libinterp/operators/op-sm-sm.cc, libinterp/operators/op-str-m.cc,
libinterp/operators/op-str-s.cc, libinterp/operators/op-str-str.cc,
libinterp/operators/ops.h, libinterp/parse-tree/lex.h,
libinterp/parse-tree/parse.h, libinterp/parse-tree/pt-arg-list.cc,
libinterp/parse-tree/pt-arg-list.h, libinterp/parse-tree/pt-assign.cc,
libinterp/parse-tree/pt-assign.h, libinterp/parse-tree/pt-binop.cc,
libinterp/parse-tree/pt-binop.h, libinterp/parse-tree/pt-bp.h,
libinterp/parse-tree/pt-cbinop.cc, libinterp/parse-tree/pt-check.cc,
libinterp/parse-tree/pt-colon.cc, libinterp/parse-tree/pt-colon.h,
libinterp/parse-tree/pt-const.cc, libinterp/parse-tree/pt-decl.cc,
libinterp/parse-tree/pt-decl.h, libinterp/parse-tree/pt-eval.cc,
libinterp/parse-tree/pt-except.h, libinterp/parse-tree/pt-exp.h,
libinterp/parse-tree/pt-fcn-handle.cc, libinterp/parse-tree/pt-id.cc,
libinterp/parse-tree/pt-id.h, libinterp/parse-tree/pt-idx.cc,
libinterp/parse-tree/pt-idx.h, libinterp/parse-tree/pt-loop.h,
libinterp/parse-tree/pt-mat.cc, libinterp/parse-tree/pt-misc.cc,
libinterp/parse-tree/pt-misc.h, libinterp/parse-tree/pt-pr-code.cc,
libinterp/parse-tree/pt-select.h, libinterp/parse-tree/pt-stmt.h,
libinterp/parse-tree/token.h, libinterp/version.cc:
Use GNU style coding conventions for code in libinterp/
author | Rik <rik@octave.org> |
---|---|
date | Mon, 28 Oct 2013 19:51:46 -0700 |
parents | d63878346099 |
children | c02b8bf0e1f9 |
comparison
equal
deleted
inserted
replaced
17786:34d9812a943b | 17787:175b392e91fe |
---|---|
108 | 108 |
109 return retval; | 109 return retval; |
110 } | 110 } |
111 | 111 |
112 DEFUNX ("dup2", Fdup2, args, , | 112 DEFUNX ("dup2", Fdup2, args, , |
113 "-*- texinfo -*-\n\ | 113 "-*- texinfo -*-\n\ |
114 @deftypefn {Built-in Function} {[@var{fid}, @var{msg}] =} dup2 (@var{old}, @var{new})\n\ | 114 @deftypefn {Built-in Function} {[@var{fid}, @var{msg}] =} dup2 (@var{old}, @var{new})\n\ |
115 Duplicate a file descriptor.\n\ | 115 Duplicate a file descriptor.\n\ |
116 \n\ | 116 \n\ |
117 If successful, @var{fid} is greater than zero and contains the new file\n\ | 117 If successful, @var{fid} is greater than zero and contains the new file\n\ |
118 ID@. Otherwise, @var{fid} is negative and @var{msg} contains a\n\ | 118 ID@. Otherwise, @var{fid} is negative and @var{msg} contains a\n\ |
160 | 160 |
161 return retval; | 161 return retval; |
162 } | 162 } |
163 | 163 |
164 DEFUNX ("exec", Fexec, args, , | 164 DEFUNX ("exec", Fexec, args, , |
165 "-*- texinfo -*-\n\ | 165 "-*- texinfo -*-\n\ |
166 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} exec (@var{file}, @var{args})\n\ | 166 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} exec (@var{file}, @var{args})\n\ |
167 Replace current process with a new process. Calling @code{exec} without\n\ | 167 Replace current process with a new process. Calling @code{exec} without\n\ |
168 first calling @code{fork} will terminate your current Octave process and\n\ | 168 first calling @code{fork} will terminate your current Octave process and\n\ |
169 replace it with the program named by @var{file}. For example,\n\ | 169 replace it with the program named by @var{file}. For example,\n\ |
170 \n\ | 170 \n\ |
243 | 243 |
244 return retval; | 244 return retval; |
245 } | 245 } |
246 | 246 |
247 DEFUNX ("popen2", Fpopen2, args, , | 247 DEFUNX ("popen2", Fpopen2, args, , |
248 "-*- texinfo -*-\n\ | 248 "-*- texinfo -*-\n\ |
249 @deftypefn {Built-in Function} {[@var{in}, @var{out}, @var{pid}] =} popen2 (@var{command}, @var{args})\n\ | 249 @deftypefn {Built-in Function} {[@var{in}, @var{out}, @var{pid}] =} popen2 (@var{command}, @var{args})\n\ |
250 Start a subprocess with two-way communication. The name of the process\n\ | 250 Start a subprocess with two-way communication. The name of the process\n\ |
251 is given by @var{command}, and @var{args} is an array of strings\n\ | 251 is given by @var{command}, and @var{args} is an array of strings\n\ |
252 containing options for the command. The file identifiers for the input\n\ | 252 containing options for the command. The file identifiers for the input\n\ |
253 and output streams of the subprocess are returned in @var{in} and\n\ | 253 and output streams of the subprocess are returned in @var{in} and\n\ |
337 { | 337 { |
338 int fildes[2]; | 338 int fildes[2]; |
339 std::string msg; | 339 std::string msg; |
340 pid_t pid; | 340 pid_t pid; |
341 | 341 |
342 pid = octave_syscalls::popen2 (exec_file, arg_list, sync_mode, fildes, msg, interactive); | 342 pid = octave_syscalls::popen2 (exec_file, arg_list, sync_mode, |
343 fildes, msg, interactive); | |
343 if (pid >= 0) | 344 if (pid >= 0) |
344 { | 345 { |
345 FILE *ifile = fdopen (fildes[1], "r"); | 346 FILE *ifile = fdopen (fildes[1], "r"); |
346 FILE *ofile = fdopen (fildes[0], "w"); | 347 FILE *ofile = fdopen (fildes[0], "w"); |
347 | 348 |
348 std::string nm; | 349 std::string nm; |
349 | 350 |
350 octave_stream is = octave_stdiostream::create (nm, ifile, | 351 octave_stream is = octave_stdiostream::create (nm, ifile, |
351 std::ios::in); | 352 std::ios::in); |
352 | 353 |
353 octave_stream os = octave_stdiostream::create (nm, ofile, | 354 octave_stream os = octave_stdiostream::create (nm, ofile, |
354 std::ios::out); | 355 std::ios::out); |
355 | 356 |
356 Cell file_ids (1, 2); | 357 Cell file_ids (1, 2); |
357 | 358 |
358 retval(2) = pid; | 359 retval(2) = pid; |
359 retval(1) = octave_stream_list::insert (is); | 360 retval(1) = octave_stream_list::insert (is); |
360 retval(0) = octave_stream_list::insert (os); | 361 retval(0) = octave_stream_list::insert (os); |
361 } | 362 } |
362 else | 363 else |
363 error (msg.c_str ()); | 364 error (msg.c_str ()); |
364 } | 365 } |
365 } | 366 } |
366 else | 367 else |
367 error ("popen2: arguments must be character strings"); | 368 error ("popen2: arguments must be character strings"); |
415 %! assert (str, {"these\r\n","strings\r\n","some\r\n","are\r\n"}); | 416 %! assert (str, {"these\r\n","strings\r\n","some\r\n","are\r\n"}); |
416 %! endif | 417 %! endif |
417 */ | 418 */ |
418 | 419 |
419 DEFUNX ("fcntl", Ffcntl, args, , | 420 DEFUNX ("fcntl", Ffcntl, args, , |
420 "-*- texinfo -*-\n\ | 421 "-*- texinfo -*-\n\ |
421 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} fcntl (@var{fid}, @var{request}, @var{arg})\n\ | 422 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} fcntl (@var{fid}, @var{request}, @var{arg})\n\ |
422 Change the properties of the open file @var{fid}. The following values\n\ | 423 Change the properties of the open file @var{fid}. The following values\n\ |
423 may be passed as @var{request}:\n\ | 424 may be passed as @var{request}:\n\ |
424 \n\ | 425 \n\ |
425 @vtable @code\n\ | 426 @vtable @code\n\ |
491 int req = args(1).int_value (true); | 492 int req = args(1).int_value (true); |
492 int arg = args(2).int_value (true); | 493 int arg = args(2).int_value (true); |
493 | 494 |
494 if (! error_state) | 495 if (! error_state) |
495 { | 496 { |
496 // FIXME -- Need better checking here? | 497 // FIXME: Need better checking here? |
497 if (fid < 0) | 498 if (fid < 0) |
498 error ("fcntl: invalid file id"); | 499 error ("fcntl: invalid file id"); |
499 else | 500 else |
500 { | 501 { |
501 std::string msg; | 502 std::string msg; |
515 | 516 |
516 return retval; | 517 return retval; |
517 } | 518 } |
518 | 519 |
519 DEFUNX ("fork", Ffork, args, , | 520 DEFUNX ("fork", Ffork, args, , |
520 "-*- texinfo -*-\n\ | 521 "-*- texinfo -*-\n\ |
521 @deftypefn {Built-in Function} {[@var{pid}, @var{msg}] =} fork ()\n\ | 522 @deftypefn {Built-in Function} {[@var{pid}, @var{msg}] =} fork ()\n\ |
522 Create a copy of the current process.\n\ | 523 Create a copy of the current process.\n\ |
523 \n\ | 524 \n\ |
524 Fork can return one of the following values:\n\ | 525 Fork can return one of the following values:\n\ |
525 \n\ | 526 \n\ |
560 | 561 |
561 return retval; | 562 return retval; |
562 } | 563 } |
563 | 564 |
564 DEFUNX ("getpgrp", Fgetpgrp, args, , | 565 DEFUNX ("getpgrp", Fgetpgrp, args, , |
565 "-*- texinfo -*-\n\ | 566 "-*- texinfo -*-\n\ |
566 @deftypefn {Built-in Function} {pgid =} getpgrp ()\n\ | 567 @deftypefn {Built-in Function} {pgid =} getpgrp ()\n\ |
567 Return the process group id of the current process.\n\ | 568 Return the process group id of the current process.\n\ |
568 @end deftypefn") | 569 @end deftypefn") |
569 { | 570 { |
570 octave_value_list retval; | 571 octave_value_list retval; |
586 | 587 |
587 return retval; | 588 return retval; |
588 } | 589 } |
589 | 590 |
590 DEFUNX ("getpid", Fgetpid, args, , | 591 DEFUNX ("getpid", Fgetpid, args, , |
591 "-*- texinfo -*-\n\ | 592 "-*- texinfo -*-\n\ |
592 @deftypefn {Built-in Function} {pid =} getpid ()\n\ | 593 @deftypefn {Built-in Function} {pid =} getpid ()\n\ |
593 Return the process id of the current process.\n\ | 594 Return the process id of the current process.\n\ |
594 @end deftypefn") | 595 @end deftypefn") |
595 { | 596 { |
596 octave_value retval = -1; | 597 octave_value retval = -1; |
604 | 605 |
605 return retval; | 606 return retval; |
606 } | 607 } |
607 | 608 |
608 DEFUNX ("getppid", Fgetppid, args, , | 609 DEFUNX ("getppid", Fgetppid, args, , |
609 "-*- texinfo -*-\n\ | 610 "-*- texinfo -*-\n\ |
610 @deftypefn {Built-in Function} {pid =} getppid ()\n\ | 611 @deftypefn {Built-in Function} {pid =} getppid ()\n\ |
611 Return the process id of the parent process.\n\ | 612 Return the process id of the parent process.\n\ |
612 @end deftypefn") | 613 @end deftypefn") |
613 { | 614 { |
614 octave_value retval = -1; | 615 octave_value retval = -1; |
622 | 623 |
623 return retval; | 624 return retval; |
624 } | 625 } |
625 | 626 |
626 DEFUNX ("getegid", Fgetegid, args, , | 627 DEFUNX ("getegid", Fgetegid, args, , |
627 "-*- texinfo -*-\n\ | 628 "-*- texinfo -*-\n\ |
628 @deftypefn {Built-in Function} {egid =} getegid ()\n\ | 629 @deftypefn {Built-in Function} {egid =} getegid ()\n\ |
629 Return the effective group id of the current process.\n\ | 630 Return the effective group id of the current process.\n\ |
630 @end deftypefn") | 631 @end deftypefn") |
631 { | 632 { |
632 octave_value retval = -1; | 633 octave_value retval = -1; |
640 | 641 |
641 return retval; | 642 return retval; |
642 } | 643 } |
643 | 644 |
644 DEFUNX ("getgid", Fgetgid, args, , | 645 DEFUNX ("getgid", Fgetgid, args, , |
645 "-*- texinfo -*-\n\ | 646 "-*- texinfo -*-\n\ |
646 @deftypefn {Built-in Function} {gid =} getgid ()\n\ | 647 @deftypefn {Built-in Function} {gid =} getgid ()\n\ |
647 Return the real group id of the current process.\n\ | 648 Return the real group id of the current process.\n\ |
648 @end deftypefn") | 649 @end deftypefn") |
649 { | 650 { |
650 octave_value retval = -1; | 651 octave_value retval = -1; |
658 | 659 |
659 return retval; | 660 return retval; |
660 } | 661 } |
661 | 662 |
662 DEFUNX ("geteuid", Fgeteuid, args, , | 663 DEFUNX ("geteuid", Fgeteuid, args, , |
663 "-*- texinfo -*-\n\ | 664 "-*- texinfo -*-\n\ |
664 @deftypefn {Built-in Function} {euid =} geteuid ()\n\ | 665 @deftypefn {Built-in Function} {euid =} geteuid ()\n\ |
665 Return the effective user id of the current process.\n\ | 666 Return the effective user id of the current process.\n\ |
666 @end deftypefn") | 667 @end deftypefn") |
667 { | 668 { |
668 octave_value retval = -1; | 669 octave_value retval = -1; |
676 | 677 |
677 return retval; | 678 return retval; |
678 } | 679 } |
679 | 680 |
680 DEFUNX ("getuid", Fgetuid, args, , | 681 DEFUNX ("getuid", Fgetuid, args, , |
681 "-*- texinfo -*-\n\ | 682 "-*- texinfo -*-\n\ |
682 @deftypefn {Built-in Function} {uid =} getuid ()\n\ | 683 @deftypefn {Built-in Function} {uid =} getuid ()\n\ |
683 Return the real user id of the current process.\n\ | 684 Return the real user id of the current process.\n\ |
684 @end deftypefn") | 685 @end deftypefn") |
685 { | 686 { |
686 octave_value retval = -1; | 687 octave_value retval = -1; |
694 | 695 |
695 return retval; | 696 return retval; |
696 } | 697 } |
697 | 698 |
698 DEFUNX ("kill", Fkill, args, , | 699 DEFUNX ("kill", Fkill, args, , |
699 "-*- texinfo -*-\n\ | 700 "-*- texinfo -*-\n\ |
700 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} kill (@var{pid}, @var{sig})\n\ | 701 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} kill (@var{pid}, @var{sig})\n\ |
701 Send signal @var{sig} to process @var{pid}.\n\ | 702 Send signal @var{sig} to process @var{pid}.\n\ |
702 \n\ | 703 \n\ |
703 If @var{pid} is positive, then signal @var{sig} is sent to @var{pid}.\n\ | 704 If @var{pid} is positive, then signal @var{sig} is sent to @var{pid}.\n\ |
704 \n\ | 705 \n\ |
746 | 747 |
747 return retval; | 748 return retval; |
748 } | 749 } |
749 | 750 |
750 DEFUNX ("lstat", Flstat, args, , | 751 DEFUNX ("lstat", Flstat, args, , |
751 "-*- texinfo -*-\n\ | 752 "-*- texinfo -*-\n\ |
752 @deftypefn {Built-in Function} {@var{info} =} lstat (@var{symlink})\n\ | 753 @deftypefn {Built-in Function} {@var{info} =} lstat (@var{symlink})\n\ |
753 @deftypefnx {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} lstat (@var{symlink})\n\ | 754 @deftypefnx {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} lstat (@var{symlink})\n\ |
754 Return a structure @var{info} containing information about the symbolic link\n\ | 755 Return a structure @var{info} containing information about the symbolic link\n\ |
755 @var{symlink}.\n\ | 756 @var{symlink}.\n\ |
756 \n\ | 757 \n\ |
776 | 777 |
777 return retval; | 778 return retval; |
778 } | 779 } |
779 | 780 |
780 DEFUNX ("mkfifo", Fmkfifo, args, , | 781 DEFUNX ("mkfifo", Fmkfifo, args, , |
781 "-*- texinfo -*-\n\ | 782 "-*- texinfo -*-\n\ |
782 @deftypefn {Built-in Function} {} mkfifo (@var{name}, @var{mode})\n\ | 783 @deftypefn {Built-in Function} {} mkfifo (@var{name}, @var{mode})\n\ |
783 @deftypefnx {Built-in Function} {[@var{err}, @var{msg}] =} mkfifo (@var{name}, @var{mode})\n\ | 784 @deftypefnx {Built-in Function} {[@var{err}, @var{msg}] =} mkfifo (@var{name}, @var{mode})\n\ |
784 Create a FIFO special file named @var{name} with file mode @var{mode}\n\ | 785 Create a FIFO special file named @var{name} with file mode @var{mode}\n\ |
785 \n\ | 786 \n\ |
786 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ | 787 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ |
831 | 832 |
832 return retval; | 833 return retval; |
833 } | 834 } |
834 | 835 |
835 DEFUNX ("pipe", Fpipe, args, , | 836 DEFUNX ("pipe", Fpipe, args, , |
836 "-*- texinfo -*-\n\ | 837 "-*- texinfo -*-\n\ |
837 @deftypefn {Built-in Function} {[@var{read_fd}, @var{write_fd}, @var{err}, @var{msg}] =} pipe ()\n\ | 838 @deftypefn {Built-in Function} {[@var{read_fd}, @var{write_fd}, @var{err}, @var{msg}] =} pipe ()\n\ |
838 Create a pipe and return the reading and writing ends of the pipe\n\ | 839 Create a pipe and return the reading and writing ends of the pipe\n\ |
839 into @var{read_fd} and @var{write_fd} respectively.\n\ | 840 into @var{read_fd} and @var{write_fd} respectively.\n\ |
840 \n\ | 841 \n\ |
841 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ | 842 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ |
886 | 887 |
887 return retval; | 888 return retval; |
888 } | 889 } |
889 | 890 |
890 DEFUNX ("stat", Fstat, args, , | 891 DEFUNX ("stat", Fstat, args, , |
891 "-*- texinfo -*-\n\ | 892 "-*- texinfo -*-\n\ |
892 @deftypefn {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} stat (@var{file})\n\ | 893 @deftypefn {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} stat (@var{file})\n\ |
893 @deftypefnx {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} stat (@var{fid})\n\ | 894 @deftypefnx {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} stat (@var{fid})\n\ |
894 @deftypefnx {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} lstat (@var{file})\n\ | 895 @deftypefnx {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} lstat (@var{file})\n\ |
895 @deftypefnx {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} lstat (@var{fid})\n\ | 896 @deftypefnx {Built-in Function} {[@var{info}, @var{err}, @var{msg}] =} lstat (@var{fid})\n\ |
896 Return a structure @var{info} containing the following information about\n\ | 897 Return a structure @var{info} containing the following information about\n\ |
1015 | 1016 |
1016 return retval; | 1017 return retval; |
1017 } | 1018 } |
1018 | 1019 |
1019 DEFUNX ("S_ISREG", FS_ISREG, args, , | 1020 DEFUNX ("S_ISREG", FS_ISREG, args, , |
1020 "-*- texinfo -*-\n\ | 1021 "-*- texinfo -*-\n\ |
1021 @deftypefn {Built-in Function} {} S_ISREG (@var{mode})\n\ | 1022 @deftypefn {Built-in Function} {} S_ISREG (@var{mode})\n\ |
1022 Return true if @var{mode} corresponds to a regular file.\n\ | 1023 Return true if @var{mode} corresponds to a regular file.\n\ |
1023 \n\ | 1024 \n\ |
1024 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ | 1025 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ |
1025 @seealso{stat, lstat}\n\ | 1026 @seealso{stat, lstat}\n\ |
1041 | 1042 |
1042 return retval; | 1043 return retval; |
1043 } | 1044 } |
1044 | 1045 |
1045 DEFUNX ("S_ISDIR", FS_ISDIR, args, , | 1046 DEFUNX ("S_ISDIR", FS_ISDIR, args, , |
1046 "-*- texinfo -*-\n\ | 1047 "-*- texinfo -*-\n\ |
1047 @deftypefn {Built-in Function} {} S_ISDIR (@var{mode})\n\ | 1048 @deftypefn {Built-in Function} {} S_ISDIR (@var{mode})\n\ |
1048 Return true if @var{mode} corresponds to a directory.\n\ | 1049 Return true if @var{mode} corresponds to a directory.\n\ |
1049 \n\ | 1050 \n\ |
1050 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ | 1051 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ |
1051 @seealso{stat, lstat}\n\ | 1052 @seealso{stat, lstat}\n\ |
1067 | 1068 |
1068 return retval; | 1069 return retval; |
1069 } | 1070 } |
1070 | 1071 |
1071 DEFUNX ("S_ISCHR", FS_ISCHR, args, , | 1072 DEFUNX ("S_ISCHR", FS_ISCHR, args, , |
1072 "-*- texinfo -*-\n\ | 1073 "-*- texinfo -*-\n\ |
1073 @deftypefn {Built-in Function} {} S_ISCHR (@var{mode})\n\ | 1074 @deftypefn {Built-in Function} {} S_ISCHR (@var{mode})\n\ |
1074 Return true if @var{mode} corresponds to a character device.\n\ | 1075 Return true if @var{mode} corresponds to a character device.\n\ |
1075 \n\ | 1076 \n\ |
1076 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ | 1077 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ |
1077 @seealso{stat, lstat}\n\ | 1078 @seealso{stat, lstat}\n\ |
1093 | 1094 |
1094 return retval; | 1095 return retval; |
1095 } | 1096 } |
1096 | 1097 |
1097 DEFUNX ("S_ISBLK", FS_ISBLK, args, , | 1098 DEFUNX ("S_ISBLK", FS_ISBLK, args, , |
1098 "-*- texinfo -*-\n\ | 1099 "-*- texinfo -*-\n\ |
1099 @deftypefn {Built-in Function} {} S_ISBLK (@var{mode})\n\ | 1100 @deftypefn {Built-in Function} {} S_ISBLK (@var{mode})\n\ |
1100 Return true if @var{mode} corresponds to a block device.\n\ | 1101 Return true if @var{mode} corresponds to a block device.\n\ |
1101 \n\ | 1102 \n\ |
1102 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ | 1103 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ |
1103 @seealso{stat, lstat}\n\ | 1104 @seealso{stat, lstat}\n\ |
1119 | 1120 |
1120 return retval; | 1121 return retval; |
1121 } | 1122 } |
1122 | 1123 |
1123 DEFUNX ("S_ISFIFO", FS_ISFIFO, args, , | 1124 DEFUNX ("S_ISFIFO", FS_ISFIFO, args, , |
1124 "-*- texinfo -*-\n\ | 1125 "-*- texinfo -*-\n\ |
1125 @deftypefn {Built-in Function} {} S_ISFIFO (@var{mode})\n\ | 1126 @deftypefn {Built-in Function} {} S_ISFIFO (@var{mode})\n\ |
1126 Return true if @var{mode} corresponds to a fifo.\n\ | 1127 Return true if @var{mode} corresponds to a fifo.\n\ |
1127 \n\ | 1128 \n\ |
1128 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ | 1129 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ |
1129 @seealso{stat, lstat}\n\ | 1130 @seealso{stat, lstat}\n\ |
1145 | 1146 |
1146 return retval; | 1147 return retval; |
1147 } | 1148 } |
1148 | 1149 |
1149 DEFUNX ("S_ISLNK", FS_ISLNK, args, , | 1150 DEFUNX ("S_ISLNK", FS_ISLNK, args, , |
1150 "-*- texinfo -*-\n\ | 1151 "-*- texinfo -*-\n\ |
1151 @deftypefn {Built-in Function} {} S_ISLNK (@var{mode})\n\ | 1152 @deftypefn {Built-in Function} {} S_ISLNK (@var{mode})\n\ |
1152 Return true if @var{mode} corresponds to a symbolic link.\n\ | 1153 Return true if @var{mode} corresponds to a symbolic link.\n\ |
1153 \n\ | 1154 \n\ |
1154 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ | 1155 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ |
1155 @seealso{stat, lstat}\n\ | 1156 @seealso{stat, lstat}\n\ |
1171 | 1172 |
1172 return retval; | 1173 return retval; |
1173 } | 1174 } |
1174 | 1175 |
1175 DEFUNX ("S_ISSOCK", FS_ISSOCK, args, , | 1176 DEFUNX ("S_ISSOCK", FS_ISSOCK, args, , |
1176 "-*- texinfo -*-\n\ | 1177 "-*- texinfo -*-\n\ |
1177 @deftypefn {Built-in Function} {} S_ISSOCK (@var{mode})\n\ | 1178 @deftypefn {Built-in Function} {} S_ISSOCK (@var{mode})\n\ |
1178 Return true if @var{mode} corresponds to a socket.\n\ | 1179 Return true if @var{mode} corresponds to a socket.\n\ |
1179 \n\ | 1180 \n\ |
1180 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ | 1181 The value of @var{mode} is assumed to be returned from a call to @code{stat}.\n\ |
1181 @seealso{stat, lstat}\n\ | 1182 @seealso{stat, lstat}\n\ |
1197 | 1198 |
1198 return retval; | 1199 return retval; |
1199 } | 1200 } |
1200 | 1201 |
1201 DEFUN (gethostname, args, , | 1202 DEFUN (gethostname, args, , |
1202 "-*- texinfo -*-\n\ | 1203 "-*- texinfo -*-\n\ |
1203 @deftypefn {Built-in Function} {} gethostname ()\n\ | 1204 @deftypefn {Built-in Function} {} gethostname ()\n\ |
1204 Return the hostname of the system where Octave is running.\n\ | 1205 Return the hostname of the system where Octave is running.\n\ |
1205 @end deftypefn") | 1206 @end deftypefn") |
1206 { | 1207 { |
1207 octave_value retval; | 1208 octave_value retval; |
1213 | 1214 |
1214 return retval; | 1215 return retval; |
1215 } | 1216 } |
1216 | 1217 |
1217 DEFUN (uname, args, , | 1218 DEFUN (uname, args, , |
1218 "-*- texinfo -*-\n\ | 1219 "-*- texinfo -*-\n\ |
1219 @deftypefn {Built-in Function} {[@var{uts}, @var{err}, @var{msg}] =} uname ()\n\ | 1220 @deftypefn {Built-in Function} {[@var{uts}, @var{err}, @var{msg}] =} uname ()\n\ |
1220 Return system information in the structure. For example:\n\ | 1221 Return system information in the structure. For example:\n\ |
1221 \n\ | 1222 \n\ |
1222 @example\n\ | 1223 @example\n\ |
1223 @group\n\ | 1224 @group\n\ |
1260 | 1261 |
1261 return retval; | 1262 return retval; |
1262 } | 1263 } |
1263 | 1264 |
1264 DEFUNX ("unlink", Funlink, args, , | 1265 DEFUNX ("unlink", Funlink, args, , |
1265 "-*- texinfo -*-\n\ | 1266 "-*- texinfo -*-\n\ |
1266 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} unlink (@var{file})\n\ | 1267 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} unlink (@var{file})\n\ |
1267 Delete the file named @var{file}.\n\ | 1268 Delete the file named @var{file}.\n\ |
1268 \n\ | 1269 \n\ |
1269 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ | 1270 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ |
1270 Otherwise, @var{err} is nonzero and @var{msg} contains a\n\ | 1271 Otherwise, @var{err} is nonzero and @var{msg} contains a\n\ |
1299 | 1300 |
1300 return retval; | 1301 return retval; |
1301 } | 1302 } |
1302 | 1303 |
1303 DEFUNX ("waitpid", Fwaitpid, args, , | 1304 DEFUNX ("waitpid", Fwaitpid, args, , |
1304 "-*- texinfo -*-\n\ | 1305 "-*- texinfo -*-\n\ |
1305 @deftypefn {Built-in Function} {[@var{pid}, @var{status}, @var{msg}] =} waitpid (@var{pid}, @var{options})\n\ | 1306 @deftypefn {Built-in Function} {[@var{pid}, @var{status}, @var{msg}] =} waitpid (@var{pid}, @var{options})\n\ |
1306 Wait for process @var{pid} to terminate. The @var{pid} argument can be:\n\ | 1307 Wait for process @var{pid} to terminate. The @var{pid} argument can be:\n\ |
1307 \n\ | 1308 \n\ |
1308 @table @asis\n\ | 1309 @table @asis\n\ |
1309 @item @minus{}1\n\ | 1310 @item @minus{}1\n\ |
1368 { | 1369 { |
1369 std::string msg; | 1370 std::string msg; |
1370 | 1371 |
1371 int status = 0; | 1372 int status = 0; |
1372 | 1373 |
1373 pid_t result = octave_syscalls::waitpid (pid, &status, options, msg); | 1374 pid_t result = octave_syscalls::waitpid (pid, &status, |
1375 options, msg); | |
1374 | 1376 |
1375 retval(2) = msg; | 1377 retval(2) = msg; |
1376 retval(1) = status; | 1378 retval(1) = status; |
1377 retval(0) = result; | 1379 retval(0) = result; |
1378 } | 1380 } |
1387 | 1389 |
1388 return retval; | 1390 return retval; |
1389 } | 1391 } |
1390 | 1392 |
1391 DEFUNX ("WIFEXITED", FWIFEXITED, args, , | 1393 DEFUNX ("WIFEXITED", FWIFEXITED, args, , |
1392 "-*- texinfo -*-\n\ | 1394 "-*- texinfo -*-\n\ |
1393 @deftypefn {Built-in Function} {} WIFEXITED (@var{status})\n\ | 1395 @deftypefn {Built-in Function} {} WIFEXITED (@var{status})\n\ |
1394 Given @var{status} from a call to @code{waitpid}, return true if the\n\ | 1396 Given @var{status} from a call to @code{waitpid}, return true if the\n\ |
1395 child terminated normally.\n\ | 1397 child terminated normally.\n\ |
1396 @seealso{waitpid, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ | 1398 @seealso{waitpid, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ |
1397 @end deftypefn") | 1399 @end deftypefn") |
1410 | 1412 |
1411 return retval; | 1413 return retval; |
1412 } | 1414 } |
1413 | 1415 |
1414 DEFUNX ("WEXITSTATUS", FWEXITSTATUS, args, , | 1416 DEFUNX ("WEXITSTATUS", FWEXITSTATUS, args, , |
1415 "-*- texinfo -*-\n\ | 1417 "-*- texinfo -*-\n\ |
1416 @deftypefn {Built-in Function} {} WEXITSTATUS (@var{status})\n\ | 1418 @deftypefn {Built-in Function} {} WEXITSTATUS (@var{status})\n\ |
1417 Given @var{status} from a call to @code{waitpid}, return the exit\n\ | 1419 Given @var{status} from a call to @code{waitpid}, return the exit\n\ |
1418 status of the child. This function should only be employed if\n\ | 1420 status of the child. This function should only be employed if\n\ |
1419 @code{WIFEXITED} returned true.\n\ | 1421 @code{WIFEXITED} returned true.\n\ |
1420 @seealso{waitpid, WIFEXITED, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ | 1422 @seealso{waitpid, WIFEXITED, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ |
1434 | 1436 |
1435 return retval; | 1437 return retval; |
1436 } | 1438 } |
1437 | 1439 |
1438 DEFUNX ("WIFSIGNALED", FWIFSIGNALED, args, , | 1440 DEFUNX ("WIFSIGNALED", FWIFSIGNALED, args, , |
1439 "-*- texinfo -*-\n\ | 1441 "-*- texinfo -*-\n\ |
1440 @deftypefn {Built-in Function} {} WIFSIGNALED (@var{status})\n\ | 1442 @deftypefn {Built-in Function} {} WIFSIGNALED (@var{status})\n\ |
1441 Given @var{status} from a call to @code{waitpid}, return true if the\n\ | 1443 Given @var{status} from a call to @code{waitpid}, return true if the\n\ |
1442 child process was terminated by a signal.\n\ | 1444 child process was terminated by a signal.\n\ |
1443 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ | 1445 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ |
1444 @end deftypefn") | 1446 @end deftypefn") |
1457 | 1459 |
1458 return retval; | 1460 return retval; |
1459 } | 1461 } |
1460 | 1462 |
1461 DEFUNX ("WTERMSIG", FWTERMSIG, args, , | 1463 DEFUNX ("WTERMSIG", FWTERMSIG, args, , |
1462 "-*- texinfo -*-\n\ | 1464 "-*- texinfo -*-\n\ |
1463 @deftypefn {Built-in Function} {} WTERMSIG (@var{status})\n\ | 1465 @deftypefn {Built-in Function} {} WTERMSIG (@var{status})\n\ |
1464 Given @var{status} from a call to @code{waitpid}, return the number of\n\ | 1466 Given @var{status} from a call to @code{waitpid}, return the number of\n\ |
1465 the signal that caused the child process to terminate. This function\n\ | 1467 the signal that caused the child process to terminate. This function\n\ |
1466 should only be employed if @code{WIFSIGNALED} returned true.\n\ | 1468 should only be employed if @code{WIFSIGNALED} returned true.\n\ |
1467 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ | 1469 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ |
1481 | 1483 |
1482 return retval; | 1484 return retval; |
1483 } | 1485 } |
1484 | 1486 |
1485 DEFUNX ("WCOREDUMP", FWCOREDUMP, args, , | 1487 DEFUNX ("WCOREDUMP", FWCOREDUMP, args, , |
1486 "-*- texinfo -*-\n\ | 1488 "-*- texinfo -*-\n\ |
1487 @deftypefn {Built-in Function} {} WCOREDUMP (@var{status})\n\ | 1489 @deftypefn {Built-in Function} {} WCOREDUMP (@var{status})\n\ |
1488 Given @var{status} from a call to @code{waitpid}, return true if the\n\ | 1490 Given @var{status} from a call to @code{waitpid}, return true if the\n\ |
1489 child produced a core dump. This function should only be employed if\n\ | 1491 child produced a core dump. This function should only be employed if\n\ |
1490 @code{WIFSIGNALED} returned true. The macro used to implement this\n\ | 1492 @code{WIFSIGNALED} returned true. The macro used to implement this\n\ |
1491 function is not specified in POSIX.1-2001 and is not available on some\n\ | 1493 function is not specified in POSIX.1-2001 and is not available on some\n\ |
1507 | 1509 |
1508 return retval; | 1510 return retval; |
1509 } | 1511 } |
1510 | 1512 |
1511 DEFUNX ("WIFSTOPPED", FWIFSTOPPED, args, , | 1513 DEFUNX ("WIFSTOPPED", FWIFSTOPPED, args, , |
1512 "-*- texinfo -*-\n\ | 1514 "-*- texinfo -*-\n\ |
1513 @deftypefn {Built-in Function} {} WIFSTOPPED (@var{status})\n\ | 1515 @deftypefn {Built-in Function} {} WIFSTOPPED (@var{status})\n\ |
1514 Given @var{status} from a call to @code{waitpid}, return true if the\n\ | 1516 Given @var{status} from a call to @code{waitpid}, return true if the\n\ |
1515 child process was stopped by delivery of a signal; this is only\n\ | 1517 child process was stopped by delivery of a signal; this is only\n\ |
1516 possible if the call was done using @code{WUNTRACED} or when the child\n\ | 1518 possible if the call was done using @code{WUNTRACED} or when the child\n\ |
1517 is being traced (see ptrace(2)).\n\ | 1519 is being traced (see ptrace(2)).\n\ |
1532 | 1534 |
1533 return retval; | 1535 return retval; |
1534 } | 1536 } |
1535 | 1537 |
1536 DEFUNX ("WSTOPSIG", FWSTOPSIG, args, , | 1538 DEFUNX ("WSTOPSIG", FWSTOPSIG, args, , |
1537 "-*- texinfo -*-\n\ | 1539 "-*- texinfo -*-\n\ |
1538 @deftypefn {Built-in Function} {} WSTOPSIG (@var{status})\n\ | 1540 @deftypefn {Built-in Function} {} WSTOPSIG (@var{status})\n\ |
1539 Given @var{status} from a call to @code{waitpid}, return the number of\n\ | 1541 Given @var{status} from a call to @code{waitpid}, return the number of\n\ |
1540 the signal which caused the child to stop. This function should only\n\ | 1542 the signal which caused the child to stop. This function should only\n\ |
1541 be employed if @code{WIFSTOPPED} returned true.\n\ | 1543 be employed if @code{WIFSTOPPED} returned true.\n\ |
1542 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WIFCONTINUED}\n\ | 1544 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WIFCONTINUED}\n\ |
1556 | 1558 |
1557 return retval; | 1559 return retval; |
1558 } | 1560 } |
1559 | 1561 |
1560 DEFUNX ("WIFCONTINUED", FWIFCONTINUED, args, , | 1562 DEFUNX ("WIFCONTINUED", FWIFCONTINUED, args, , |
1561 "-*- texinfo -*-\n\ | 1563 "-*- texinfo -*-\n\ |
1562 @deftypefn {Built-in Function} {} WIFCONTINUED (@var{status})\n\ | 1564 @deftypefn {Built-in Function} {} WIFCONTINUED (@var{status})\n\ |
1563 Given @var{status} from a call to @code{waitpid}, return true if the\n\ | 1565 Given @var{status} from a call to @code{waitpid}, return true if the\n\ |
1564 child process was resumed by delivery of @code{SIGCONT}.\n\ | 1566 child process was resumed by delivery of @code{SIGCONT}.\n\ |
1565 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG}\n\ | 1567 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG}\n\ |
1566 @end deftypefn") | 1568 @end deftypefn") |
1579 | 1581 |
1580 return retval; | 1582 return retval; |
1581 } | 1583 } |
1582 | 1584 |
1583 DEFUNX ("canonicalize_file_name", Fcanonicalize_file_name, args, , | 1585 DEFUNX ("canonicalize_file_name", Fcanonicalize_file_name, args, , |
1584 "-*- texinfo -*-\n\ | 1586 "-*- texinfo -*-\n\ |
1585 @deftypefn {Built-in Function} {[@var{cname}, @var{status}, @var{msg}] =} canonicalize_file_name (@var{fname})\n\ | 1587 @deftypefn {Built-in Function} {[@var{cname}, @var{status}, @var{msg}] =} canonicalize_file_name (@var{fname})\n\ |
1586 Return the canonical name of file @var{fname}. If the file does not exist\n\ | 1588 Return the canonical name of file @var{fname}. If the file does not exist\n\ |
1587 the empty string (\"\") is returned.\n\ | 1589 the empty string (\"\") is returned.\n\ |
1588 @seealso{make_absolute_filename, is_absolute_filename, is_rooted_relative_filename}\n\ | 1590 @seealso{make_absolute_filename, is_absolute_filename, is_rooted_relative_filename}\n\ |
1589 @end deftypefn") | 1591 @end deftypefn") |
1631 #if !defined (O_NONBLOCK) && defined (O_NDELAY) | 1633 #if !defined (O_NONBLOCK) && defined (O_NDELAY) |
1632 #define O_NONBLOCK O_NDELAY | 1634 #define O_NONBLOCK O_NDELAY |
1633 #endif | 1635 #endif |
1634 | 1636 |
1635 DEFUNX ("F_DUPFD", FF_DUPFD, args, , | 1637 DEFUNX ("F_DUPFD", FF_DUPFD, args, , |
1636 "-*- texinfo -*-\n\ | 1638 "-*- texinfo -*-\n\ |
1637 @deftypefn {Built-in Function} {} F_DUPFD ()\n\ | 1639 @deftypefn {Built-in Function} {} F_DUPFD ()\n\ |
1638 Return the numerical value to pass to @code{fcntl} to return a\n\ | 1640 Return the numerical value to pass to @code{fcntl} to return a\n\ |
1639 duplicate file descriptor.\n\ | 1641 duplicate file descriptor.\n\ |
1640 @seealso{fcntl, F_GETFD, F_GETFL, F_SETFD, F_SETFL}\n\ | 1642 @seealso{fcntl, F_GETFD, F_GETFL, F_SETFD, F_SETFL}\n\ |
1641 @end deftypefn") | 1643 @end deftypefn") |
1647 return octave_value (); | 1649 return octave_value (); |
1648 #endif | 1650 #endif |
1649 } | 1651 } |
1650 | 1652 |
1651 DEFUNX ("F_GETFD", FF_GETFD, args, , | 1653 DEFUNX ("F_GETFD", FF_GETFD, args, , |
1652 "-*- texinfo -*-\n\ | 1654 "-*- texinfo -*-\n\ |
1653 @deftypefn {Built-in Function} {} F_GETFD ()\n\ | 1655 @deftypefn {Built-in Function} {} F_GETFD ()\n\ |
1654 Return the numerical value to pass to @code{fcntl} to return the\n\ | 1656 Return the numerical value to pass to @code{fcntl} to return the\n\ |
1655 file descriptor flags.\n\ | 1657 file descriptor flags.\n\ |
1656 @seealso{fcntl, F_DUPFD, F_GETFL, F_SETFD, F_SETFL}\n\ | 1658 @seealso{fcntl, F_DUPFD, F_GETFL, F_SETFD, F_SETFL}\n\ |
1657 @end deftypefn") | 1659 @end deftypefn") |
1663 return octave_value (); | 1665 return octave_value (); |
1664 #endif | 1666 #endif |
1665 } | 1667 } |
1666 | 1668 |
1667 DEFUNX ("F_GETFL", FF_GETFL, args, , | 1669 DEFUNX ("F_GETFL", FF_GETFL, args, , |
1668 "-*- texinfo -*-\n\ | 1670 "-*- texinfo -*-\n\ |
1669 @deftypefn {Built-in Function} {} F_GETFL ()\n\ | 1671 @deftypefn {Built-in Function} {} F_GETFL ()\n\ |
1670 Return the numerical value to pass to @code{fcntl} to return the\n\ | 1672 Return the numerical value to pass to @code{fcntl} to return the\n\ |
1671 file status flags.\n\ | 1673 file status flags.\n\ |
1672 @seealso{fcntl, F_DUPFD, F_GETFD, F_SETFD, F_SETFL}\n\ | 1674 @seealso{fcntl, F_DUPFD, F_GETFD, F_SETFD, F_SETFL}\n\ |
1673 @end deftypefn") | 1675 @end deftypefn") |
1679 return octave_value (); | 1681 return octave_value (); |
1680 #endif | 1682 #endif |
1681 } | 1683 } |
1682 | 1684 |
1683 DEFUNX ("F_SETFD", FF_SETFD, args, , | 1685 DEFUNX ("F_SETFD", FF_SETFD, args, , |
1684 "-*- texinfo -*-\n\ | 1686 "-*- texinfo -*-\n\ |
1685 @deftypefn {Built-in Function} {} F_SETFD ()\n\ | 1687 @deftypefn {Built-in Function} {} F_SETFD ()\n\ |
1686 Return the numerical value to pass to @code{fcntl} to set the file\n\ | 1688 Return the numerical value to pass to @code{fcntl} to set the file\n\ |
1687 descriptor flags.\n\ | 1689 descriptor flags.\n\ |
1688 @seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFL}\n\ | 1690 @seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFL}\n\ |
1689 @end deftypefn") | 1691 @end deftypefn") |
1695 return octave_value (); | 1697 return octave_value (); |
1696 #endif | 1698 #endif |
1697 } | 1699 } |
1698 | 1700 |
1699 DEFUNX ("F_SETFL", FF_SETFL, args, , | 1701 DEFUNX ("F_SETFL", FF_SETFL, args, , |
1700 "-*- texinfo -*-\n\ | 1702 "-*- texinfo -*-\n\ |
1701 @deftypefn {Built-in Function} {} F_SETFL ()\n\ | 1703 @deftypefn {Built-in Function} {} F_SETFL ()\n\ |
1702 Return the numerical value to pass to @code{fcntl} to set the file\n\ | 1704 Return the numerical value to pass to @code{fcntl} to set the file\n\ |
1703 status flags.\n\ | 1705 status flags.\n\ |
1704 @seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFD}\n\ | 1706 @seealso{fcntl, F_DUPFD, F_GETFD, F_GETFL, F_SETFD}\n\ |
1705 @end deftypefn") | 1707 @end deftypefn") |
1711 return octave_value (); | 1713 return octave_value (); |
1712 #endif | 1714 #endif |
1713 } | 1715 } |
1714 | 1716 |
1715 DEFUNX ("O_APPEND", FO_APPEND, args, , | 1717 DEFUNX ("O_APPEND", FO_APPEND, args, , |
1716 "-*- texinfo -*-\n\ | 1718 "-*- texinfo -*-\n\ |
1717 @deftypefn {Built-in Function} {} O_APPEND ()\n\ | 1719 @deftypefn {Built-in Function} {} O_APPEND ()\n\ |
1718 Return the numerical value of the file status flag that may be\n\ | 1720 Return the numerical value of the file status flag that may be\n\ |
1719 returned by @code{fcntl} to indicate each write operation appends,\n\ | 1721 returned by @code{fcntl} to indicate each write operation appends,\n\ |
1720 or that may be passed to @code{fcntl} to set the write mode to append.\n\ | 1722 or that may be passed to @code{fcntl} to set the write mode to append.\n\ |
1721 @seealso{fcntl, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ | 1723 @seealso{fcntl, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ |
1728 return octave_value (); | 1730 return octave_value (); |
1729 #endif | 1731 #endif |
1730 } | 1732 } |
1731 | 1733 |
1732 DEFUNX ("O_ASYNC", FO_ASYNC, args, , | 1734 DEFUNX ("O_ASYNC", FO_ASYNC, args, , |
1733 "-*- texinfo -*-\n\ | 1735 "-*- texinfo -*-\n\ |
1734 @deftypefn {Built-in Function} {} O_ASYNC ()\n\ | 1736 @deftypefn {Built-in Function} {} O_ASYNC ()\n\ |
1735 Return the numerical value of the file status flag that may be\n\ | 1737 Return the numerical value of the file status flag that may be\n\ |
1736 returned by @code{fcntl} to indicate asynchronous I/O.\n\ | 1738 returned by @code{fcntl} to indicate asynchronous I/O.\n\ |
1737 @seealso{fcntl, O_APPEND, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ | 1739 @seealso{fcntl, O_APPEND, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ |
1738 @end deftypefn") | 1740 @end deftypefn") |
1744 return octave_value (); | 1746 return octave_value (); |
1745 #endif | 1747 #endif |
1746 } | 1748 } |
1747 | 1749 |
1748 DEFUNX ("O_CREAT", FO_CREAT, args, , | 1750 DEFUNX ("O_CREAT", FO_CREAT, args, , |
1749 "-*- texinfo -*-\n\ | 1751 "-*- texinfo -*-\n\ |
1750 @deftypefn {Built-in Function} {} O_CREAT ()\n\ | 1752 @deftypefn {Built-in Function} {} O_CREAT ()\n\ |
1751 Return the numerical value of the file status flag that may be\n\ | 1753 Return the numerical value of the file status flag that may be\n\ |
1752 returned by @code{fcntl} to indicate that a file should be\n\ | 1754 returned by @code{fcntl} to indicate that a file should be\n\ |
1753 created if it does not exist.\n\ | 1755 created if it does not exist.\n\ |
1754 @seealso{fcntl, O_APPEND, O_ASYNC, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ | 1756 @seealso{fcntl, O_APPEND, O_ASYNC, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ |
1761 return octave_value (); | 1763 return octave_value (); |
1762 #endif | 1764 #endif |
1763 } | 1765 } |
1764 | 1766 |
1765 DEFUNX ("O_EXCL", FO_EXCL, args, , | 1767 DEFUNX ("O_EXCL", FO_EXCL, args, , |
1766 "-*- texinfo -*-\n\ | 1768 "-*- texinfo -*-\n\ |
1767 @deftypefn {Built-in Function} {} O_EXCL ()\n\ | 1769 @deftypefn {Built-in Function} {} O_EXCL ()\n\ |
1768 Return the numerical value of the file status flag that may be\n\ | 1770 Return the numerical value of the file status flag that may be\n\ |
1769 returned by @code{fcntl} to indicate that file locking is used.\n\ | 1771 returned by @code{fcntl} to indicate that file locking is used.\n\ |
1770 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ | 1772 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ |
1771 @end deftypefn") | 1773 @end deftypefn") |
1777 return octave_value (); | 1779 return octave_value (); |
1778 #endif | 1780 #endif |
1779 } | 1781 } |
1780 | 1782 |
1781 DEFUNX ("O_NONBLOCK", FO_NONBLOCK, args, , | 1783 DEFUNX ("O_NONBLOCK", FO_NONBLOCK, args, , |
1782 "-*- texinfo -*-\n\ | 1784 "-*- texinfo -*-\n\ |
1783 @deftypefn {Built-in Function} {} O_NONBLOCK ()\n\ | 1785 @deftypefn {Built-in Function} {} O_NONBLOCK ()\n\ |
1784 Return the numerical value of the file status flag that may be\n\ | 1786 Return the numerical value of the file status flag that may be\n\ |
1785 returned by @code{fcntl} to indicate that non-blocking I/O is in use,\n\ | 1787 returned by @code{fcntl} to indicate that non-blocking I/O is in use,\n\ |
1786 or that may be passsed to @code{fcntl} to set non-blocking I/O.\n\ | 1788 or that may be passsed to @code{fcntl} to set non-blocking I/O.\n\ |
1787 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ | 1789 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ |
1794 return octave_value (); | 1796 return octave_value (); |
1795 #endif | 1797 #endif |
1796 } | 1798 } |
1797 | 1799 |
1798 DEFUNX ("O_RDONLY", FO_RDONLY, args, , | 1800 DEFUNX ("O_RDONLY", FO_RDONLY, args, , |
1799 "-*- texinfo -*-\n\ | 1801 "-*- texinfo -*-\n\ |
1800 @deftypefn {Built-in Function} {} O_RDONLY ()\n\ | 1802 @deftypefn {Built-in Function} {} O_RDONLY ()\n\ |
1801 Return the numerical value of the file status flag that may be\n\ | 1803 Return the numerical value of the file status flag that may be\n\ |
1802 returned by @code{fcntl} to indicate that a file is open for\n\ | 1804 returned by @code{fcntl} to indicate that a file is open for\n\ |
1803 reading only.\n\ | 1805 reading only.\n\ |
1804 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ | 1806 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ |
1811 return octave_value (); | 1813 return octave_value (); |
1812 #endif | 1814 #endif |
1813 } | 1815 } |
1814 | 1816 |
1815 DEFUNX ("O_RDWR", FO_RDWR, args, , | 1817 DEFUNX ("O_RDWR", FO_RDWR, args, , |
1816 "-*- texinfo -*-\n\ | 1818 "-*- texinfo -*-\n\ |
1817 @deftypefn {Built-in Function} {} O_RDWR ()\n\ | 1819 @deftypefn {Built-in Function} {} O_RDWR ()\n\ |
1818 Return the numerical value of the file status flag that may be\n\ | 1820 Return the numerical value of the file status flag that may be\n\ |
1819 returned by @code{fcntl} to indicate that a file is open for both\n\ | 1821 returned by @code{fcntl} to indicate that a file is open for both\n\ |
1820 reading and writing.\n\ | 1822 reading and writing.\n\ |
1821 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_SYNC, O_TRUNC, O_WRONLY}\n\ | 1823 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_SYNC, O_TRUNC, O_WRONLY}\n\ |
1828 return octave_value (); | 1830 return octave_value (); |
1829 #endif | 1831 #endif |
1830 } | 1832 } |
1831 | 1833 |
1832 DEFUNX ("O_SYNC", FO_SYNC, args, , | 1834 DEFUNX ("O_SYNC", FO_SYNC, args, , |
1833 "-*- texinfo -*-\n\ | 1835 "-*- texinfo -*-\n\ |
1834 @deftypefn {Built-in Function} {} O_SYNC ()\n\ | 1836 @deftypefn {Built-in Function} {} O_SYNC ()\n\ |
1835 Return the numerical value of the file status flag that may be\n\ | 1837 Return the numerical value of the file status flag that may be\n\ |
1836 returned by @code{fcntl} to indicate that a file is open for\n\ | 1838 returned by @code{fcntl} to indicate that a file is open for\n\ |
1837 synchronous I/O.\n\ | 1839 synchronous I/O.\n\ |
1838 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY}\n\ | 1840 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY}\n\ |
1845 return octave_value (); | 1847 return octave_value (); |
1846 #endif | 1848 #endif |
1847 } | 1849 } |
1848 | 1850 |
1849 DEFUNX ("O_TRUNC", FO_TRUNC, args, , | 1851 DEFUNX ("O_TRUNC", FO_TRUNC, args, , |
1850 "-*- texinfo -*-\n\ | 1852 "-*- texinfo -*-\n\ |
1851 @deftypefn {Built-in Function} O_TRUNC ()\n\ | 1853 @deftypefn {Built-in Function} O_TRUNC ()\n\ |
1852 Return the numerical value of the file status flag that may be\n\ | 1854 Return the numerical value of the file status flag that may be\n\ |
1853 returned by @code{fcntl} to indicate that if file exists, it should\n\ | 1855 returned by @code{fcntl} to indicate that if file exists, it should\n\ |
1854 be truncated when writing.\n\ | 1856 be truncated when writing.\n\ |
1855 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_WRONLY}\n\ | 1857 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_WRONLY}\n\ |
1862 return octave_value (); | 1864 return octave_value (); |
1863 #endif | 1865 #endif |
1864 } | 1866 } |
1865 | 1867 |
1866 DEFUNX ("O_WRONLY", FO_WRONLY, args, , | 1868 DEFUNX ("O_WRONLY", FO_WRONLY, args, , |
1867 "-*- texinfo -*-\n\ | 1869 "-*- texinfo -*-\n\ |
1868 @deftypefn {Built-in Function} {} O_WRONLY ()\n\ | 1870 @deftypefn {Built-in Function} {} O_WRONLY ()\n\ |
1869 Return the numerical value of the file status flag that may be\n\ | 1871 Return the numerical value of the file status flag that may be\n\ |
1870 returned by @code{fcntl} to indicate that a file is open for\n\ | 1872 returned by @code{fcntl} to indicate that a file is open for\n\ |
1871 writing only.\n\ | 1873 writing only.\n\ |
1872 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC}\n\ | 1874 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC}\n\ |
1883 #if !defined (WNOHANG) | 1885 #if !defined (WNOHANG) |
1884 #define WNOHANG 0 | 1886 #define WNOHANG 0 |
1885 #endif | 1887 #endif |
1886 | 1888 |
1887 DEFUNX ("WNOHANG", FWNOHANG, args, , | 1889 DEFUNX ("WNOHANG", FWNOHANG, args, , |
1888 "-*- texinfo -*-\n\ | 1890 "-*- texinfo -*-\n\ |
1889 @deftypefn {Built-in Function} {} WNOHANG ()\n\ | 1891 @deftypefn {Built-in Function} {} WNOHANG ()\n\ |
1890 Return the numerical value of the option argument that may be\n\ | 1892 Return the numerical value of the option argument that may be\n\ |
1891 passed to @code{waitpid} to indicate that it should return its\n\ | 1893 passed to @code{waitpid} to indicate that it should return its\n\ |
1892 status immediately instead of waiting for a process to exit.\n\ | 1894 status immediately instead of waiting for a process to exit.\n\ |
1893 @seealso{waitpid, WUNTRACED, WCONTINUE}\n\ | 1895 @seealso{waitpid, WUNTRACED, WCONTINUE}\n\ |
1899 #if !defined (WUNTRACED) | 1901 #if !defined (WUNTRACED) |
1900 #define WUNTRACED 0 | 1902 #define WUNTRACED 0 |
1901 #endif | 1903 #endif |
1902 | 1904 |
1903 DEFUNX ("WUNTRACED", FWUNTRACED, args, , | 1905 DEFUNX ("WUNTRACED", FWUNTRACED, args, , |
1904 "-*- texinfo -*-\n\ | 1906 "-*- texinfo -*-\n\ |
1905 @deftypefn {Built-in Function} {} WUNTRACED ()\n\ | 1907 @deftypefn {Built-in Function} {} WUNTRACED ()\n\ |
1906 Return the numerical value of the option argument that may be\n\ | 1908 Return the numerical value of the option argument that may be\n\ |
1907 passed to @code{waitpid} to indicate that it should also return\n\ | 1909 passed to @code{waitpid} to indicate that it should also return\n\ |
1908 if the child process has stopped but is not traced via the\n\ | 1910 if the child process has stopped but is not traced via the\n\ |
1909 @code{ptrace} system call\n\ | 1911 @code{ptrace} system call\n\ |
1916 #if !defined (WCONTINUE) | 1918 #if !defined (WCONTINUE) |
1917 #define WCONTINUE 0 | 1919 #define WCONTINUE 0 |
1918 #endif | 1920 #endif |
1919 | 1921 |
1920 DEFUNX ("WCONTINUE", FWCONTINUE, args, , | 1922 DEFUNX ("WCONTINUE", FWCONTINUE, args, , |
1921 "-*- texinfo -*-\n\ | 1923 "-*- texinfo -*-\n\ |
1922 @deftypefn {Built-in Function} {} WCONTINUE ()\n\ | 1924 @deftypefn {Built-in Function} {} WCONTINUE ()\n\ |
1923 Return the numerical value of the option argument that may be\n\ | 1925 Return the numerical value of the option argument that may be\n\ |
1924 passed to @code{waitpid} to indicate that it should also return\n\ | 1926 passed to @code{waitpid} to indicate that it should also return\n\ |
1925 if a stopped child has been resumed by delivery of a @code{SIGCONT}\n\ | 1927 if a stopped child has been resumed by delivery of a @code{SIGCONT}\n\ |
1926 signal.\n\ | 1928 signal.\n\ |