Mercurial > hg > octave-jordi
comparison libinterp/corefcn/syscalls.cc @ 20171:4f45eaf83908 stable
doc: Update more docstrings to have one sentence summary as first line.
Reviewed libinterp/corefcn directory.
* libinterp/corefcn/__ilu__.cc, libinterp/corefcn/balance.cc,
libinterp/corefcn/besselj.cc, libinterp/corefcn/betainc.cc,
libinterp/corefcn/bitfcns.cc, libinterp/corefcn/bsxfun.cc,
libinterp/corefcn/cellfun.cc, libinterp/corefcn/colloc.cc,
libinterp/corefcn/conv2.cc, libinterp/corefcn/data.cc,
libinterp/corefcn/debug.cc, libinterp/corefcn/defaults.cc,
libinterp/corefcn/det.cc, libinterp/corefcn/dirfns.cc,
libinterp/corefcn/dlmread.cc, libinterp/corefcn/dot.cc,
libinterp/corefcn/eig.cc, libinterp/corefcn/error.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/graphics.cc, libinterp/corefcn/help.cc,
libinterp/corefcn/hex2num.cc, libinterp/corefcn/input.cc,
libinterp/corefcn/inv.cc, libinterp/corefcn/kron.cc,
libinterp/corefcn/load-path.cc, libinterp/corefcn/load-save.cc,
libinterp/corefcn/lookup.cc, 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/mgorth.cc,
libinterp/corefcn/nproc.cc, libinterp/corefcn/oct-hist.cc,
libinterp/corefcn/ordschur.cc, libinterp/corefcn/pager.cc,
libinterp/corefcn/pinv.cc, libinterp/corefcn/pr-output.cc,
libinterp/corefcn/pt-jit.cc, 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/sparse.cc,
libinterp/corefcn/spparms.cc, libinterp/corefcn/str2double.cc,
libinterp/corefcn/strfind.cc, libinterp/corefcn/strfns.cc,
libinterp/corefcn/sub2ind.cc, libinterp/corefcn/svd.cc,
libinterp/corefcn/symtab.cc, libinterp/corefcn/syscalls.cc,
libinterp/corefcn/sysdep.cc, libinterp/corefcn/time.cc,
libinterp/corefcn/toplev.cc, libinterp/corefcn/tril.cc,
libinterp/corefcn/tsearch.cc, libinterp/corefcn/typecast.cc,
libinterp/corefcn/urlwrite.cc, libinterp/corefcn/utils.cc,
libinterp/corefcn/variables.cc, scripts/polynomial/spline.m:
Update more docstrings to have one sentence summary as first line.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 09 May 2015 17:19:30 -0700 |
parents | 4197fc428c7d |
children | aa36fb998a4d |
comparison
equal
deleted
inserted
replaced
20170:b70f8da6dcd3 | 20171:4f45eaf83908 |
---|---|
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 ID@.\n\ |
118 ID@. Otherwise, @var{fid} is negative and @var{msg} contains a\n\ | 118 Otherwise, @var{fid} is negative and @var{msg} contains a system-dependent\n\ |
119 system-dependent error message.\n\ | 119 error message.\n\ |
120 @seealso{fopen, fclose, fcntl}\n\ | 120 @seealso{fopen, fclose, fcntl}\n\ |
121 @end deftypefn") | 121 @end deftypefn") |
122 { | 122 { |
123 octave_value_list retval; | 123 octave_value_list retval; |
124 | 124 |
163 } | 163 } |
164 | 164 |
165 DEFUNX ("exec", Fexec, args, , | 165 DEFUNX ("exec", Fexec, args, , |
166 "-*- texinfo -*-\n\ | 166 "-*- texinfo -*-\n\ |
167 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} exec (@var{file}, @var{args})\n\ | 167 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} exec (@var{file}, @var{args})\n\ |
168 Replace current process with a new process. Calling @code{exec} without\n\ | 168 Replace current process with a new process.\n\ |
169 first calling @code{fork} will terminate your current Octave process and\n\ | 169 \n\ |
170 replace it with the program named by @var{file}. For example,\n\ | 170 Calling @code{exec} without first calling @code{fork} will terminate your\n\ |
171 current Octave process and replace it with the program named by @var{file}. \n\ | |
172 For example,\n\ | |
171 \n\ | 173 \n\ |
172 @example\n\ | 174 @example\n\ |
173 exec (\"ls\" \"-l\")\n\ | 175 exec (\"ls\" \"-l\")\n\ |
174 @end example\n\ | 176 @end example\n\ |
175 \n\ | 177 \n\ |
246 } | 248 } |
247 | 249 |
248 DEFUNX ("popen2", Fpopen2, args, , | 250 DEFUNX ("popen2", Fpopen2, args, , |
249 "-*- texinfo -*-\n\ | 251 "-*- texinfo -*-\n\ |
250 @deftypefn {Built-in Function} {[@var{in}, @var{out}, @var{pid}] =} popen2 (@var{command}, @var{args})\n\ | 252 @deftypefn {Built-in Function} {[@var{in}, @var{out}, @var{pid}] =} popen2 (@var{command}, @var{args})\n\ |
251 Start a subprocess with two-way communication. The name of the process\n\ | 253 Start a subprocess with two-way communication.\n\ |
252 is given by @var{command}, and @var{args} is an array of strings\n\ | 254 \n\ |
253 containing options for the command. The file identifiers for the input\n\ | 255 The name of the process is given by @var{command}, and @var{args} is an\n\ |
254 and output streams of the subprocess are returned in @var{in} and\n\ | 256 array of strings containing options for the command.\n\ |
255 @var{out}. If execution of the command is successful, @var{pid}\n\ | 257 \n\ |
256 contains the process ID of the subprocess. Otherwise, @var{pid} is\n\ | 258 The file identifiers for the input and output streams of the subprocess are\n\ |
257 @minus{}1.\n\ | 259 returned in @var{in} and @var{out}. If execution of the command is\n\ |
260 successful, @var{pid} contains the process ID of the subprocess. Otherwise,\n\ | |
261 @var{pid} is @minus{}1.\n\ | |
258 \n\ | 262 \n\ |
259 For example:\n\ | 263 For example:\n\ |
260 \n\ | 264 \n\ |
261 @example\n\ | 265 @example\n\ |
262 [in, out, pid] = popen2 (\"sort\", \"-r\");\n\ | 266 [in, out, pid] = popen2 (\"sort\", \"-r\");\n\ |
492 @item O_ASYNC\n\ | 496 @item O_ASYNC\n\ |
493 Asynchronous I/O.\n\ | 497 Asynchronous I/O.\n\ |
494 @end vtable\n\ | 498 @end vtable\n\ |
495 \n\ | 499 \n\ |
496 @item F_SETFL\n\ | 500 @item F_SETFL\n\ |
497 Set the file status flags for @var{fid} to the value specified by\n\ | 501 Set the file status flags for @var{fid} to the value specified by @var{arg}.\n\ |
498 @var{arg}. The only flags that can be changed are @w{@code{O_APPEND}} and\n\ | 502 The only flags that can be changed are @w{@code{O_APPEND}} and\n\ |
499 @w{@code{O_NONBLOCK}}.\n\ | 503 @w{@code{O_NONBLOCK}}.\n\ |
500 @end vtable\n\ | 504 @end vtable\n\ |
501 \n\ | 505 \n\ |
502 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ | 506 If successful, @var{err} is 0 and @var{msg} is an empty string. Otherwise,\n\ |
503 Otherwise, @var{err} is nonzero and @var{msg} contains a\n\ | 507 @var{err} is nonzero and @var{msg} contains a system-dependent error\n\ |
504 system-dependent error message.\n\ | 508 message.\n\ |
505 @seealso{fopen, dup2}\n\ | 509 @seealso{fopen, dup2}\n\ |
506 @end deftypefn") | 510 @end deftypefn") |
507 { | 511 { |
508 octave_value_list retval; | 512 octave_value_list retval; |
509 | 513 |
555 \n\ | 559 \n\ |
556 Fork can return one of the following values:\n\ | 560 Fork can return one of the following values:\n\ |
557 \n\ | 561 \n\ |
558 @table @asis\n\ | 562 @table @asis\n\ |
559 @item > 0\n\ | 563 @item > 0\n\ |
560 You are in the parent process. The value returned from @code{fork} is\n\ | 564 You are in the parent process. The value returned from @code{fork} is the\n\ |
561 the process id of the child process. You should probably arrange to\n\ | 565 process id of the child process. You should probably arrange to wait for\n\ |
562 wait for any child processes to exit.\n\ | 566 any child processes to exit.\n\ |
563 \n\ | 567 \n\ |
564 @item 0\n\ | 568 @item 0\n\ |
565 You are in the child process. You can call @code{exec} to start another\n\ | 569 You are in the child process. You can call @code{exec} to start another\n\ |
566 process. If that fails, you should probably call @code{exit}.\n\ | 570 process. If that fails, you should probably call @code{exit}.\n\ |
567 \n\ | 571 \n\ |
621 | 625 |
622 DEFUNX ("getpid", Fgetpid, args, , | 626 DEFUNX ("getpid", Fgetpid, args, , |
623 "-*- texinfo -*-\n\ | 627 "-*- texinfo -*-\n\ |
624 @deftypefn {Built-in Function} {pid =} getpid ()\n\ | 628 @deftypefn {Built-in Function} {pid =} getpid ()\n\ |
625 Return the process id of the current process.\n\ | 629 Return the process id of the current process.\n\ |
630 @seealso{getppid}\n\ | |
626 @end deftypefn") | 631 @end deftypefn") |
627 { | 632 { |
628 octave_value retval = -1; | 633 octave_value retval = -1; |
629 | 634 |
630 int nargin = args.length (); | 635 int nargin = args.length (); |
639 | 644 |
640 DEFUNX ("getppid", Fgetppid, args, , | 645 DEFUNX ("getppid", Fgetppid, args, , |
641 "-*- texinfo -*-\n\ | 646 "-*- texinfo -*-\n\ |
642 @deftypefn {Built-in Function} {pid =} getppid ()\n\ | 647 @deftypefn {Built-in Function} {pid =} getppid ()\n\ |
643 Return the process id of the parent process.\n\ | 648 Return the process id of the parent process.\n\ |
649 @seealso{getpid}\n\ | |
644 @end deftypefn") | 650 @end deftypefn") |
645 { | 651 { |
646 octave_value retval = -1; | 652 octave_value retval = -1; |
647 | 653 |
648 int nargin = args.length (); | 654 int nargin = args.length (); |
657 | 663 |
658 DEFUNX ("getegid", Fgetegid, args, , | 664 DEFUNX ("getegid", Fgetegid, args, , |
659 "-*- texinfo -*-\n\ | 665 "-*- texinfo -*-\n\ |
660 @deftypefn {Built-in Function} {egid =} getegid ()\n\ | 666 @deftypefn {Built-in Function} {egid =} getegid ()\n\ |
661 Return the effective group id of the current process.\n\ | 667 Return the effective group id of the current process.\n\ |
668 @seealso{getgid}\n\ | |
662 @end deftypefn") | 669 @end deftypefn") |
663 { | 670 { |
664 octave_value retval = -1; | 671 octave_value retval = -1; |
665 | 672 |
666 int nargin = args.length (); | 673 int nargin = args.length (); |
675 | 682 |
676 DEFUNX ("getgid", Fgetgid, args, , | 683 DEFUNX ("getgid", Fgetgid, args, , |
677 "-*- texinfo -*-\n\ | 684 "-*- texinfo -*-\n\ |
678 @deftypefn {Built-in Function} {gid =} getgid ()\n\ | 685 @deftypefn {Built-in Function} {gid =} getgid ()\n\ |
679 Return the real group id of the current process.\n\ | 686 Return the real group id of the current process.\n\ |
687 @seealso{getegid}\n\ | |
680 @end deftypefn") | 688 @end deftypefn") |
681 { | 689 { |
682 octave_value retval = -1; | 690 octave_value retval = -1; |
683 | 691 |
684 int nargin = args.length (); | 692 int nargin = args.length (); |
693 | 701 |
694 DEFUNX ("geteuid", Fgeteuid, args, , | 702 DEFUNX ("geteuid", Fgeteuid, args, , |
695 "-*- texinfo -*-\n\ | 703 "-*- texinfo -*-\n\ |
696 @deftypefn {Built-in Function} {euid =} geteuid ()\n\ | 704 @deftypefn {Built-in Function} {euid =} geteuid ()\n\ |
697 Return the effective user id of the current process.\n\ | 705 Return the effective user id of the current process.\n\ |
706 @seealso{getuid}\n\ | |
698 @end deftypefn") | 707 @end deftypefn") |
699 { | 708 { |
700 octave_value retval = -1; | 709 octave_value retval = -1; |
701 | 710 |
702 int nargin = args.length (); | 711 int nargin = args.length (); |
711 | 720 |
712 DEFUNX ("getuid", Fgetuid, args, , | 721 DEFUNX ("getuid", Fgetuid, args, , |
713 "-*- texinfo -*-\n\ | 722 "-*- texinfo -*-\n\ |
714 @deftypefn {Built-in Function} {uid =} getuid ()\n\ | 723 @deftypefn {Built-in Function} {uid =} getuid ()\n\ |
715 Return the real user id of the current process.\n\ | 724 Return the real user id of the current process.\n\ |
725 @seealso{geteuid}\n\ | |
716 @end deftypefn") | 726 @end deftypefn") |
717 { | 727 { |
718 octave_value retval = -1; | 728 octave_value retval = -1; |
719 | 729 |
720 int nargin = args.length (); | 730 int nargin = args.length (); |
814 @deftypefn {Built-in Function} {} mkfifo (@var{name}, @var{mode})\n\ | 824 @deftypefn {Built-in Function} {} mkfifo (@var{name}, @var{mode})\n\ |
815 @deftypefnx {Built-in Function} {[@var{err}, @var{msg}] =} mkfifo (@var{name}, @var{mode})\n\ | 825 @deftypefnx {Built-in Function} {[@var{err}, @var{msg}] =} mkfifo (@var{name}, @var{mode})\n\ |
816 Create a FIFO special file named @var{name} with file mode @var{mode}\n\ | 826 Create a FIFO special file named @var{name} with file mode @var{mode}\n\ |
817 \n\ | 827 \n\ |
818 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ | 828 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ |
819 Otherwise, @var{err} is nonzero and @var{msg} contains a\n\ | 829 Otherwise, @var{err} is nonzero and @var{msg} contains a system-dependent\n\ |
820 system-dependent error message.\n\ | 830 error message.\n\ |
821 @seealso{pipe}\n\ | 831 @seealso{pipe}\n\ |
822 @end deftypefn") | 832 @end deftypefn") |
823 { | 833 { |
824 octave_value_list retval; | 834 octave_value_list retval; |
825 | 835 |
865 } | 875 } |
866 | 876 |
867 DEFUNX ("pipe", Fpipe, args, , | 877 DEFUNX ("pipe", Fpipe, args, , |
868 "-*- texinfo -*-\n\ | 878 "-*- texinfo -*-\n\ |
869 @deftypefn {Built-in Function} {[@var{read_fd}, @var{write_fd}, @var{err}, @var{msg}] =} pipe ()\n\ | 879 @deftypefn {Built-in Function} {[@var{read_fd}, @var{write_fd}, @var{err}, @var{msg}] =} pipe ()\n\ |
870 Create a pipe and return the reading and writing ends of the pipe\n\ | 880 Create a pipe and return the reading and writing ends of the pipe into\n\ |
871 into @var{read_fd} and @var{write_fd} respectively.\n\ | 881 @var{read_fd} and @var{write_fd} respectively.\n\ |
872 \n\ | 882 \n\ |
873 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ | 883 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ |
874 Otherwise, @var{err} is nonzero and @var{msg} contains a\n\ | 884 Otherwise, @var{err} is nonzero and @var{msg} contains a system-dependent\n\ |
875 system-dependent error message.\n\ | 885 error message.\n\ |
876 @seealso{mkfifo}\n\ | 886 @seealso{mkfifo}\n\ |
877 @end deftypefn") | 887 @end deftypefn") |
878 { | 888 { |
879 octave_value_list retval; | 889 octave_value_list retval; |
880 | 890 |
977 \n\ | 987 \n\ |
978 @item blocks\n\ | 988 @item blocks\n\ |
979 Number of blocks allocated for file.\n\ | 989 Number of blocks allocated for file.\n\ |
980 @end table\n\ | 990 @end table\n\ |
981 \n\ | 991 \n\ |
982 If the call is successful @var{err} is 0 and @var{msg} is an empty\n\ | 992 If the call is successful @var{err} is 0 and @var{msg} is an empty string.\n\ |
983 string. If the file does not exist, or some other error occurs, @var{info}\n\ | 993 If the file does not exist, or some other error occurs, @var{info} is an\n\ |
984 is an empty matrix, @var{err} is @minus{}1, and @var{msg} contains the\n\ | 994 empty matrix, @var{err} is @minus{}1, and @var{msg} contains the\n\ |
985 corresponding system error message.\n\ | 995 corresponding system error message.\n\ |
986 \n\ | 996 \n\ |
987 If @var{file} is a symbolic link, @code{stat} will return information\n\ | 997 If @var{file} is a symbolic link, @code{stat} will return information about\n\ |
988 about the actual file that is referenced by the link. Use @code{lstat}\n\ | 998 the actual file that is referenced by the link. Use @code{lstat} if you\n\ |
989 if you want information about the symbolic link itself.\n\ | 999 want information about the symbolic link itself.\n\ |
990 \n\ | 1000 \n\ |
991 For example:\n\ | 1001 For example:\n\ |
992 \n\ | 1002 \n\ |
993 @example\n\ | 1003 @example\n\ |
994 [info, err, msg] = stat (\"/vmlinuz\")\n\ | 1004 [info, err, msg] = stat (\"/vmlinuz\")\n\ |
1247 } | 1257 } |
1248 | 1258 |
1249 DEFUN (uname, args, , | 1259 DEFUN (uname, args, , |
1250 "-*- texinfo -*-\n\ | 1260 "-*- texinfo -*-\n\ |
1251 @deftypefn {Built-in Function} {[@var{uts}, @var{err}, @var{msg}] =} uname ()\n\ | 1261 @deftypefn {Built-in Function} {[@var{uts}, @var{err}, @var{msg}] =} uname ()\n\ |
1252 Return system information in the structure. For example:\n\ | 1262 Return system information in the structure.\n\ |
1263 \n\ | |
1264 For example:\n\ | |
1253 \n\ | 1265 \n\ |
1254 @example\n\ | 1266 @example\n\ |
1255 @group\n\ | 1267 @group\n\ |
1256 uname ()\n\ | 1268 uname ()\n\ |
1257 @result{} @{\n\ | 1269 @result{} @{\n\ |
1297 "-*- texinfo -*-\n\ | 1309 "-*- texinfo -*-\n\ |
1298 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} unlink (@var{file})\n\ | 1310 @deftypefn {Built-in Function} {[@var{err}, @var{msg}] =} unlink (@var{file})\n\ |
1299 Delete the file named @var{file}.\n\ | 1311 Delete the file named @var{file}.\n\ |
1300 \n\ | 1312 \n\ |
1301 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ | 1313 If successful, @var{err} is 0 and @var{msg} is an empty string.\n\ |
1302 Otherwise, @var{err} is nonzero and @var{msg} contains a\n\ | 1314 Otherwise, @var{err} is nonzero and @var{msg} contains a system-dependent\n\ |
1303 system-dependent error message.\n\ | 1315 error message.\n\ |
1316 @seealso{delete, rmdir}\n\ | |
1304 @end deftypefn") | 1317 @end deftypefn") |
1305 { | 1318 { |
1306 octave_value_list retval; | 1319 octave_value_list retval; |
1307 | 1320 |
1308 retval(1) = std::string (); | 1321 retval(1) = std::string (); |
1333 } | 1346 } |
1334 | 1347 |
1335 DEFUNX ("waitpid", Fwaitpid, args, , | 1348 DEFUNX ("waitpid", Fwaitpid, args, , |
1336 "-*- texinfo -*-\n\ | 1349 "-*- texinfo -*-\n\ |
1337 @deftypefn {Built-in Function} {[@var{pid}, @var{status}, @var{msg}] =} waitpid (@var{pid}, @var{options})\n\ | 1350 @deftypefn {Built-in Function} {[@var{pid}, @var{status}, @var{msg}] =} waitpid (@var{pid}, @var{options})\n\ |
1338 Wait for process @var{pid} to terminate. The @var{pid} argument can be:\n\ | 1351 Wait for process @var{pid} to terminate.\n\ |
1352 \n\ | |
1353 The @var{pid} argument can be:\n\ | |
1339 \n\ | 1354 \n\ |
1340 @table @asis\n\ | 1355 @table @asis\n\ |
1341 @item @minus{}1\n\ | 1356 @item @minus{}1\n\ |
1342 Wait for any child process.\n\ | 1357 Wait for any child process.\n\ |
1343 \n\ | 1358 \n\ |
1344 @item 0\n\ | 1359 @item 0\n\ |
1345 Wait for any child process whose process group ID is equal to that of\n\ | 1360 Wait for any child process whose process group ID is equal to that of the\n\ |
1346 the Octave interpreter process.\n\ | 1361 Octave interpreter process.\n\ |
1347 \n\ | 1362 \n\ |
1348 @item > 0\n\ | 1363 @item > 0\n\ |
1349 Wait for termination of the child process with ID @var{pid}.\n\ | 1364 Wait for termination of the child process with ID @var{pid}.\n\ |
1350 @end table\n\ | 1365 @end table\n\ |
1351 \n\ | 1366 \n\ |
1352 The @var{options} argument can be a bitwise OR of zero or more of\n\ | 1367 The @var{options} argument can be a bitwise OR of zero or more of the\n\ |
1353 the following constants:\n\ | 1368 following constants:\n\ |
1354 \n\ | 1369 \n\ |
1355 @table @code\n\ | 1370 @table @code\n\ |
1356 @item 0\n\ | 1371 @item 0\n\ |
1357 Wait until signal is received or a child process exits (this is the\n\ | 1372 Wait until signal is received or a child process exits (this is the default\n\ |
1358 default if the @var{options} argument is missing).\n\ | 1373 if the @var{options} argument is missing).\n\ |
1359 \n\ | 1374 \n\ |
1360 @item WNOHANG\n\ | 1375 @item WNOHANG\n\ |
1361 Do not hang if status is not immediately available.\n\ | 1376 Do not hang if status is not immediately available.\n\ |
1362 \n\ | 1377 \n\ |
1363 @item WUNTRACED\n\ | 1378 @item WUNTRACED\n\ |
1364 Report the status of any child processes that are stopped, and whose\n\ | 1379 Report the status of any child processes that are stopped, and whose status\n\ |
1365 status has not yet been reported since they stopped.\n\ | 1380 has not yet been reported since they stopped.\n\ |
1366 \n\ | 1381 \n\ |
1367 @item WCONTINUE\n\ | 1382 @item WCONTINUE\n\ |
1368 Return if a stopped child has been resumed by delivery of @code{SIGCONT}.\n\ | 1383 Return if a stopped child has been resumed by delivery of @code{SIGCONT}.\n\ |
1369 This value may not be meaningful on all systems.\n\ | 1384 This value may not be meaningful on all systems.\n\ |
1370 @end table\n\ | 1385 @end table\n\ |
1371 \n\ | 1386 \n\ |
1372 If the returned value of @var{pid} is greater than 0, it is the process\n\ | 1387 If the returned value of @var{pid} is greater than 0, it is the process ID\n\ |
1373 ID of the child process that exited. If an error occurs, @var{pid} will\n\ | 1388 of the child process that exited. If an error occurs, @var{pid} will be\n\ |
1374 be less than zero and @var{msg} will contain a system-dependent error\n\ | 1389 less than zero and @var{msg} will contain a system-dependent error message. \n\ |
1375 message. The value of @var{status} contains additional system-dependent\n\ | 1390 The value of @var{status} contains additional system-dependent information\n\ |
1376 information about the subprocess that exited.\n\ | 1391 about the subprocess that exited.\n\ |
1377 @seealso{WCONTINUE, WCOREDUMP, WEXITSTATUS, WIFCONTINUED, WIFSIGNALED, WIFSTOPPED, WNOHANG, WSTOPSIG, WTERMSIG, WUNTRACED}\n\ | 1392 @seealso{WCONTINUE, WCOREDUMP, WEXITSTATUS, WIFCONTINUED, WIFSIGNALED, WIFSTOPPED, WNOHANG, WSTOPSIG, WTERMSIG, WUNTRACED}\n\ |
1378 @end deftypefn") | 1393 @end deftypefn") |
1379 { | 1394 { |
1380 octave_value_list retval; | 1395 octave_value_list retval; |
1381 | 1396 |
1422 } | 1437 } |
1423 | 1438 |
1424 DEFUNX ("WIFEXITED", FWIFEXITED, args, , | 1439 DEFUNX ("WIFEXITED", FWIFEXITED, args, , |
1425 "-*- texinfo -*-\n\ | 1440 "-*- texinfo -*-\n\ |
1426 @deftypefn {Built-in Function} {} WIFEXITED (@var{status})\n\ | 1441 @deftypefn {Built-in Function} {} WIFEXITED (@var{status})\n\ |
1427 Given @var{status} from a call to @code{waitpid}, return true if the\n\ | 1442 Given @var{status} from a call to @code{waitpid}, return\n\ |
1428 child terminated normally.\n\ | 1443 true if the child terminated normally.\n\ |
1429 @seealso{waitpid, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ | 1444 @seealso{waitpid, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ |
1430 @end deftypefn") | 1445 @end deftypefn") |
1431 { | 1446 { |
1432 octave_value retval = false; | 1447 octave_value retval = false; |
1433 | 1448 |
1445 } | 1460 } |
1446 | 1461 |
1447 DEFUNX ("WEXITSTATUS", FWEXITSTATUS, args, , | 1462 DEFUNX ("WEXITSTATUS", FWEXITSTATUS, args, , |
1448 "-*- texinfo -*-\n\ | 1463 "-*- texinfo -*-\n\ |
1449 @deftypefn {Built-in Function} {} WEXITSTATUS (@var{status})\n\ | 1464 @deftypefn {Built-in Function} {} WEXITSTATUS (@var{status})\n\ |
1450 Given @var{status} from a call to @code{waitpid}, return the exit\n\ | 1465 Given @var{status} from a call to @code{waitpid}, return\n\ |
1451 status of the child. This function should only be employed if\n\ | 1466 the exit status of the child.\n\ |
1452 @code{WIFEXITED} returned true.\n\ | 1467 \n\ |
1468 This function should only be employed if @code{WIFEXITED} returned true.\n\ | |
1453 @seealso{waitpid, WIFEXITED, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ | 1469 @seealso{waitpid, WIFEXITED, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ |
1454 @end deftypefn") | 1470 @end deftypefn") |
1455 { | 1471 { |
1456 octave_value retval = 0; | 1472 octave_value retval = 0; |
1457 | 1473 |
1469 } | 1485 } |
1470 | 1486 |
1471 DEFUNX ("WIFSIGNALED", FWIFSIGNALED, args, , | 1487 DEFUNX ("WIFSIGNALED", FWIFSIGNALED, args, , |
1472 "-*- texinfo -*-\n\ | 1488 "-*- texinfo -*-\n\ |
1473 @deftypefn {Built-in Function} {} WIFSIGNALED (@var{status})\n\ | 1489 @deftypefn {Built-in Function} {} WIFSIGNALED (@var{status})\n\ |
1474 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\n\ |
1475 child process was terminated by a signal.\n\ | 1491 true if the child process was terminated by a signal.\n\ |
1476 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ | 1492 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ |
1477 @end deftypefn") | 1493 @end deftypefn") |
1478 { | 1494 { |
1479 octave_value retval = false; | 1495 octave_value retval = false; |
1480 | 1496 |
1492 } | 1508 } |
1493 | 1509 |
1494 DEFUNX ("WTERMSIG", FWTERMSIG, args, , | 1510 DEFUNX ("WTERMSIG", FWTERMSIG, args, , |
1495 "-*- texinfo -*-\n\ | 1511 "-*- texinfo -*-\n\ |
1496 @deftypefn {Built-in Function} {} WTERMSIG (@var{status})\n\ | 1512 @deftypefn {Built-in Function} {} WTERMSIG (@var{status})\n\ |
1497 Given @var{status} from a call to @code{waitpid}, return the number of\n\ | 1513 Given @var{status} from a call to @code{waitpid}, return\n\ |
1498 the signal that caused the child process to terminate. This function\n\ | 1514 the number of the signal that caused the child process to terminate.\n\ |
1499 should only be employed if @code{WIFSIGNALED} returned true.\n\ | 1515 \n\ |
1516 This function should only be employed if @code{WIFSIGNALED} returned true.\n\ | |
1500 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ | 1517 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WCOREDUMP, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ |
1501 @end deftypefn") | 1518 @end deftypefn") |
1502 { | 1519 { |
1503 octave_value retval = 0; | 1520 octave_value retval = 0; |
1504 | 1521 |
1516 } | 1533 } |
1517 | 1534 |
1518 DEFUNX ("WCOREDUMP", FWCOREDUMP, args, , | 1535 DEFUNX ("WCOREDUMP", FWCOREDUMP, args, , |
1519 "-*- texinfo -*-\n\ | 1536 "-*- texinfo -*-\n\ |
1520 @deftypefn {Built-in Function} {} WCOREDUMP (@var{status})\n\ | 1537 @deftypefn {Built-in Function} {} WCOREDUMP (@var{status})\n\ |
1521 Given @var{status} from a call to @code{waitpid}, return true if the\n\ | 1538 Given @var{status} from a call to @code{waitpid}, return\n\ |
1522 child produced a core dump. This function should only be employed if\n\ | 1539 true if the child produced a core dump.\n\ |
1523 @code{WIFSIGNALED} returned true. The macro used to implement this\n\ | 1540 \n\ |
1524 function is not specified in POSIX.1-2001 and is not available on some\n\ | 1541 This function should only be employed if @code{WIFSIGNALED} returned true. \n\ |
1525 Unix implementations (e.g., AIX, SunOS).\n\ | 1542 The macro used to implement this function is not specified in POSIX.1-2001\n\ |
1543 and is not available on some Unix implementations (e.g., AIX, SunOS).\n\ | |
1526 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ | 1544 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WIFSTOPPED, WSTOPSIG, WIFCONTINUED}\n\ |
1527 @end deftypefn") | 1545 @end deftypefn") |
1528 { | 1546 { |
1529 octave_value retval = false; | 1547 octave_value retval = false; |
1530 | 1548 |
1542 } | 1560 } |
1543 | 1561 |
1544 DEFUNX ("WIFSTOPPED", FWIFSTOPPED, args, , | 1562 DEFUNX ("WIFSTOPPED", FWIFSTOPPED, args, , |
1545 "-*- texinfo -*-\n\ | 1563 "-*- texinfo -*-\n\ |
1546 @deftypefn {Built-in Function} {} WIFSTOPPED (@var{status})\n\ | 1564 @deftypefn {Built-in Function} {} WIFSTOPPED (@var{status})\n\ |
1547 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\n\ |
1548 child process was stopped by delivery of a signal; this is only\n\ | 1566 true if the child process was stopped by delivery of a signal.\n\ |
1549 possible if the call was done using @code{WUNTRACED} or when the child\n\ | 1567 \n\ |
1550 is being traced (see ptrace(2)).\n\ | 1568 This is only possible if the call was done using @code{WUNTRACED} or when\n\ |
1569 the child is being traced (see ptrace(2)).\n\ | |
1551 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WSTOPSIG, WIFCONTINUED}\n\ | 1570 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WSTOPSIG, WIFCONTINUED}\n\ |
1552 @end deftypefn") | 1571 @end deftypefn") |
1553 { | 1572 { |
1554 octave_value retval = false; | 1573 octave_value retval = false; |
1555 | 1574 |
1567 } | 1586 } |
1568 | 1587 |
1569 DEFUNX ("WSTOPSIG", FWSTOPSIG, args, , | 1588 DEFUNX ("WSTOPSIG", FWSTOPSIG, args, , |
1570 "-*- texinfo -*-\n\ | 1589 "-*- texinfo -*-\n\ |
1571 @deftypefn {Built-in Function} {} WSTOPSIG (@var{status})\n\ | 1590 @deftypefn {Built-in Function} {} WSTOPSIG (@var{status})\n\ |
1572 Given @var{status} from a call to @code{waitpid}, return the number of\n\ | 1591 Given @var{status} from a call to @code{waitpid}, return\n\ |
1573 the signal which caused the child to stop. This function should only\n\ | 1592 the number of the signal which caused the child to stop.\n\ |
1574 be employed if @code{WIFSTOPPED} returned true.\n\ | 1593 \n\ |
1594 This function should only be employed if @code{WIFSTOPPED} returned true.\n\ | |
1575 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WIFCONTINUED}\n\ | 1595 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WIFCONTINUED}\n\ |
1576 @end deftypefn") | 1596 @end deftypefn") |
1577 { | 1597 { |
1578 octave_value retval = 0; | 1598 octave_value retval = 0; |
1579 | 1599 |
1591 } | 1611 } |
1592 | 1612 |
1593 DEFUNX ("WIFCONTINUED", FWIFCONTINUED, args, , | 1613 DEFUNX ("WIFCONTINUED", FWIFCONTINUED, args, , |
1594 "-*- texinfo -*-\n\ | 1614 "-*- texinfo -*-\n\ |
1595 @deftypefn {Built-in Function} {} WIFCONTINUED (@var{status})\n\ | 1615 @deftypefn {Built-in Function} {} WIFCONTINUED (@var{status})\n\ |
1596 Given @var{status} from a call to @code{waitpid}, return true if the\n\ | 1616 Given @var{status} from a call to @code{waitpid}, return\n\ |
1597 child process was resumed by delivery of @code{SIGCONT}.\n\ | 1617 true if the child process was resumed by delivery of @code{SIGCONT}.\n\ |
1598 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG}\n\ | 1618 @seealso{waitpid, WIFEXITED, WEXITSTATUS, WIFSIGNALED, WTERMSIG, WCOREDUMP, WIFSTOPPED, WSTOPSIG}\n\ |
1599 @end deftypefn") | 1619 @end deftypefn") |
1600 { | 1620 { |
1601 octave_value retval = false; | 1621 octave_value retval = false; |
1602 | 1622 |
1614 } | 1634 } |
1615 | 1635 |
1616 DEFUNX ("canonicalize_file_name", Fcanonicalize_file_name, args, , | 1636 DEFUNX ("canonicalize_file_name", Fcanonicalize_file_name, args, , |
1617 "-*- texinfo -*-\n\ | 1637 "-*- texinfo -*-\n\ |
1618 @deftypefn {Built-in Function} {[@var{cname}, @var{status}, @var{msg}] =} canonicalize_file_name (@var{fname})\n\ | 1638 @deftypefn {Built-in Function} {[@var{cname}, @var{status}, @var{msg}] =} canonicalize_file_name (@var{fname})\n\ |
1619 Return the canonical name of file @var{fname}. If the file does not exist\n\ | 1639 Return the canonical name of file @var{fname}.\n\ |
1620 the empty string (\"\") is returned.\n\ | 1640 \n\ |
1641 If the file does not exist the empty string (\"\") is returned.\n\ | |
1621 @seealso{make_absolute_filename, is_absolute_filename, is_rooted_relative_filename}\n\ | 1642 @seealso{make_absolute_filename, is_absolute_filename, is_rooted_relative_filename}\n\ |
1622 @end deftypefn") | 1643 @end deftypefn") |
1623 { | 1644 { |
1624 octave_value_list retval; | 1645 octave_value_list retval; |
1625 | 1646 |
1665 #endif | 1686 #endif |
1666 | 1687 |
1667 DEFUNX ("F_DUPFD", FF_DUPFD, args, , | 1688 DEFUNX ("F_DUPFD", FF_DUPFD, args, , |
1668 "-*- texinfo -*-\n\ | 1689 "-*- texinfo -*-\n\ |
1669 @deftypefn {Built-in Function} {} F_DUPFD ()\n\ | 1690 @deftypefn {Built-in Function} {} F_DUPFD ()\n\ |
1670 Return the numerical value to pass to @code{fcntl} to return a\n\ | 1691 Return the numerical value to pass to @code{fcntl} to return\n\ |
1671 duplicate file descriptor.\n\ | 1692 a duplicate file descriptor.\n\ |
1672 @seealso{fcntl, F_GETFD, F_GETFL, F_SETFD, F_SETFL}\n\ | 1693 @seealso{fcntl, F_GETFD, F_GETFL, F_SETFD, F_SETFL}\n\ |
1673 @end deftypefn") | 1694 @end deftypefn") |
1674 { | 1695 { |
1675 #if defined (F_DUPFD) | 1696 #if defined (F_DUPFD) |
1676 return const_value (args, F_DUPFD); | 1697 return const_value (args, F_DUPFD); |
1681 } | 1702 } |
1682 | 1703 |
1683 DEFUNX ("F_GETFD", FF_GETFD, args, , | 1704 DEFUNX ("F_GETFD", FF_GETFD, args, , |
1684 "-*- texinfo -*-\n\ | 1705 "-*- texinfo -*-\n\ |
1685 @deftypefn {Built-in Function} {} F_GETFD ()\n\ | 1706 @deftypefn {Built-in Function} {} F_GETFD ()\n\ |
1686 Return the numerical value to pass to @code{fcntl} to return the\n\ | 1707 Return the numerical value to pass to @code{fcntl} to return\n\ |
1687 file descriptor flags.\n\ | 1708 the file descriptor flags.\n\ |
1688 @seealso{fcntl, F_DUPFD, F_GETFL, F_SETFD, F_SETFL}\n\ | 1709 @seealso{fcntl, F_DUPFD, F_GETFL, F_SETFD, F_SETFL}\n\ |
1689 @end deftypefn") | 1710 @end deftypefn") |
1690 { | 1711 { |
1691 #if defined (F_GETFD) | 1712 #if defined (F_GETFD) |
1692 return const_value (args, F_GETFD); | 1713 return const_value (args, F_GETFD); |
1697 } | 1718 } |
1698 | 1719 |
1699 DEFUNX ("F_GETFL", FF_GETFL, args, , | 1720 DEFUNX ("F_GETFL", FF_GETFL, args, , |
1700 "-*- texinfo -*-\n\ | 1721 "-*- texinfo -*-\n\ |
1701 @deftypefn {Built-in Function} {} F_GETFL ()\n\ | 1722 @deftypefn {Built-in Function} {} F_GETFL ()\n\ |
1702 Return the numerical value to pass to @code{fcntl} to return the\n\ | 1723 Return the numerical value to pass to @code{fcntl} to return\n\ |
1703 file status flags.\n\ | 1724 the file status flags.\n\ |
1704 @seealso{fcntl, F_DUPFD, F_GETFD, F_SETFD, F_SETFL}\n\ | 1725 @seealso{fcntl, F_DUPFD, F_GETFD, F_SETFD, F_SETFL}\n\ |
1705 @end deftypefn") | 1726 @end deftypefn") |
1706 { | 1727 { |
1707 #if defined (F_GETFL) | 1728 #if defined (F_GETFL) |
1708 return const_value (args, F_GETFL); | 1729 return const_value (args, F_GETFL); |
1779 | 1800 |
1780 DEFUNX ("O_CREAT", FO_CREAT, args, , | 1801 DEFUNX ("O_CREAT", FO_CREAT, args, , |
1781 "-*- texinfo -*-\n\ | 1802 "-*- texinfo -*-\n\ |
1782 @deftypefn {Built-in Function} {} O_CREAT ()\n\ | 1803 @deftypefn {Built-in Function} {} O_CREAT ()\n\ |
1783 Return the numerical value of the file status flag that may be\n\ | 1804 Return the numerical value of the file status flag that may be\n\ |
1784 returned by @code{fcntl} to indicate that a file should be\n\ | 1805 returned by @code{fcntl} to indicate that a file should be created if it\n\ |
1785 created if it does not exist.\n\ | 1806 does not exist.\n\ |
1786 @seealso{fcntl, O_APPEND, O_ASYNC, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ | 1807 @seealso{fcntl, O_APPEND, O_ASYNC, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ |
1787 @end deftypefn") | 1808 @end deftypefn") |
1788 { | 1809 { |
1789 #if defined (O_CREAT) | 1810 #if defined (O_CREAT) |
1790 return const_value (args, O_CREAT); | 1811 return const_value (args, O_CREAT); |
1829 | 1850 |
1830 DEFUNX ("O_RDONLY", FO_RDONLY, args, , | 1851 DEFUNX ("O_RDONLY", FO_RDONLY, args, , |
1831 "-*- texinfo -*-\n\ | 1852 "-*- texinfo -*-\n\ |
1832 @deftypefn {Built-in Function} {} O_RDONLY ()\n\ | 1853 @deftypefn {Built-in Function} {} O_RDONLY ()\n\ |
1833 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\ |
1834 returned by @code{fcntl} to indicate that a file is open for\n\ | 1855 returned by @code{fcntl} to indicate that a file is open for reading only.\n\ |
1835 reading only.\n\ | |
1836 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ | 1856 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDWR, O_SYNC, O_TRUNC, O_WRONLY}\n\ |
1837 @end deftypefn") | 1857 @end deftypefn") |
1838 { | 1858 { |
1839 #if defined (O_RDONLY) | 1859 #if defined (O_RDONLY) |
1840 return const_value (args, O_RDONLY); | 1860 return const_value (args, O_RDONLY); |
1846 | 1866 |
1847 DEFUNX ("O_RDWR", FO_RDWR, args, , | 1867 DEFUNX ("O_RDWR", FO_RDWR, args, , |
1848 "-*- texinfo -*-\n\ | 1868 "-*- texinfo -*-\n\ |
1849 @deftypefn {Built-in Function} {} O_RDWR ()\n\ | 1869 @deftypefn {Built-in Function} {} O_RDWR ()\n\ |
1850 Return the numerical value of the file status flag that may be\n\ | 1870 Return the numerical value of the file status flag that may be\n\ |
1851 returned by @code{fcntl} to indicate that a file is open for both\n\ | 1871 returned by @code{fcntl} to indicate that a file is open for both reading\n\ |
1852 reading and writing.\n\ | 1872 and writing.\n\ |
1853 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_SYNC, O_TRUNC, O_WRONLY}\n\ | 1873 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_SYNC, O_TRUNC, O_WRONLY}\n\ |
1854 @end deftypefn") | 1874 @end deftypefn") |
1855 { | 1875 { |
1856 #if defined (O_RDWR) | 1876 #if defined (O_RDWR) |
1857 return const_value (args, O_RDWR); | 1877 return const_value (args, O_RDWR); |
1863 | 1883 |
1864 DEFUNX ("O_SYNC", FO_SYNC, args, , | 1884 DEFUNX ("O_SYNC", FO_SYNC, args, , |
1865 "-*- texinfo -*-\n\ | 1885 "-*- texinfo -*-\n\ |
1866 @deftypefn {Built-in Function} {} O_SYNC ()\n\ | 1886 @deftypefn {Built-in Function} {} O_SYNC ()\n\ |
1867 Return the numerical value of the file status flag that may be\n\ | 1887 Return the numerical value of the file status flag that may be\n\ |
1868 returned by @code{fcntl} to indicate that a file is open for\n\ | 1888 returned by @code{fcntl} to indicate that a file is open for synchronous I/O.\n\ |
1869 synchronous I/O.\n\ | |
1870 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY}\n\ | 1889 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_TRUNC, O_WRONLY}\n\ |
1871 @end deftypefn") | 1890 @end deftypefn") |
1872 { | 1891 { |
1873 #if defined (O_SYNC) | 1892 #if defined (O_SYNC) |
1874 return const_value (args, O_SYNC); | 1893 return const_value (args, O_SYNC); |
1880 | 1899 |
1881 DEFUNX ("O_TRUNC", FO_TRUNC, args, , | 1900 DEFUNX ("O_TRUNC", FO_TRUNC, args, , |
1882 "-*- texinfo -*-\n\ | 1901 "-*- texinfo -*-\n\ |
1883 @deftypefn {Built-in Function} {} O_TRUNC ()\n\ | 1902 @deftypefn {Built-in Function} {} O_TRUNC ()\n\ |
1884 Return the numerical value of the file status flag that may be\n\ | 1903 Return the numerical value of the file status flag that may be\n\ |
1885 returned by @code{fcntl} to indicate that if file exists, it should\n\ | 1904 returned by @code{fcntl} to indicate that if file exists, it should be\n\ |
1886 be truncated when writing.\n\ | 1905 truncated when writing.\n\ |
1887 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_WRONLY}\n\ | 1906 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_WRONLY}\n\ |
1888 @end deftypefn") | 1907 @end deftypefn") |
1889 { | 1908 { |
1890 #if defined (O_TRUNC) | 1909 #if defined (O_TRUNC) |
1891 return const_value (args, O_TRUNC); | 1910 return const_value (args, O_TRUNC); |
1897 | 1916 |
1898 DEFUNX ("O_WRONLY", FO_WRONLY, args, , | 1917 DEFUNX ("O_WRONLY", FO_WRONLY, args, , |
1899 "-*- texinfo -*-\n\ | 1918 "-*- texinfo -*-\n\ |
1900 @deftypefn {Built-in Function} {} O_WRONLY ()\n\ | 1919 @deftypefn {Built-in Function} {} O_WRONLY ()\n\ |
1901 Return the numerical value of the file status flag that may be\n\ | 1920 Return the numerical value of the file status flag that may be\n\ |
1902 returned by @code{fcntl} to indicate that a file is open for\n\ | 1921 returned by @code{fcntl} to indicate that a file is open for writing only.\n\ |
1903 writing only.\n\ | |
1904 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC}\n\ | 1922 @seealso{fcntl, O_APPEND, O_ASYNC, O_CREAT, O_EXCL, O_NONBLOCK, O_RDONLY, O_RDWR, O_SYNC, O_TRUNC}\n\ |
1905 @end deftypefn") | 1923 @end deftypefn") |
1906 { | 1924 { |
1907 #if defined (O_WRONLY) | 1925 #if defined (O_WRONLY) |
1908 return const_value (args, O_WRONLY); | 1926 return const_value (args, O_WRONLY); |
1918 | 1936 |
1919 DEFUNX ("WNOHANG", FWNOHANG, args, , | 1937 DEFUNX ("WNOHANG", FWNOHANG, args, , |
1920 "-*- texinfo -*-\n\ | 1938 "-*- texinfo -*-\n\ |
1921 @deftypefn {Built-in Function} {} WNOHANG ()\n\ | 1939 @deftypefn {Built-in Function} {} WNOHANG ()\n\ |
1922 Return the numerical value of the option argument that may be\n\ | 1940 Return the numerical value of the option argument that may be\n\ |
1923 passed to @code{waitpid} to indicate that it should return its\n\ | 1941 passed to @code{waitpid} to indicate that it should return its status\n\ |
1924 status immediately instead of waiting for a process to exit.\n\ | 1942 immediately instead of waiting for a process to exit.\n\ |
1925 @seealso{waitpid, WUNTRACED, WCONTINUE}\n\ | 1943 @seealso{waitpid, WUNTRACED, WCONTINUE}\n\ |
1926 @end deftypefn") | 1944 @end deftypefn") |
1927 { | 1945 { |
1928 return const_value (args, WNOHANG); | 1946 return const_value (args, WNOHANG); |
1929 } | 1947 } |
1934 | 1952 |
1935 DEFUNX ("WUNTRACED", FWUNTRACED, args, , | 1953 DEFUNX ("WUNTRACED", FWUNTRACED, args, , |
1936 "-*- texinfo -*-\n\ | 1954 "-*- texinfo -*-\n\ |
1937 @deftypefn {Built-in Function} {} WUNTRACED ()\n\ | 1955 @deftypefn {Built-in Function} {} WUNTRACED ()\n\ |
1938 Return the numerical value of the option argument that may be\n\ | 1956 Return the numerical value of the option argument that may be\n\ |
1939 passed to @code{waitpid} to indicate that it should also return\n\ | 1957 passed to @code{waitpid} to indicate that it should also return if the child\n\ |
1940 if the child process has stopped but is not traced via the\n\ | 1958 process has stopped but is not traced via the @code{ptrace} system call\n\ |
1941 @code{ptrace} system call\n\ | |
1942 @seealso{waitpid, WNOHANG, WCONTINUE}\n\ | 1959 @seealso{waitpid, WNOHANG, WCONTINUE}\n\ |
1943 @end deftypefn") | 1960 @end deftypefn") |
1944 { | 1961 { |
1945 return const_value (args, WUNTRACED); | 1962 return const_value (args, WUNTRACED); |
1946 } | 1963 } |
1951 | 1968 |
1952 DEFUNX ("WCONTINUE", FWCONTINUE, args, , | 1969 DEFUNX ("WCONTINUE", FWCONTINUE, args, , |
1953 "-*- texinfo -*-\n\ | 1970 "-*- texinfo -*-\n\ |
1954 @deftypefn {Built-in Function} {} WCONTINUE ()\n\ | 1971 @deftypefn {Built-in Function} {} WCONTINUE ()\n\ |
1955 Return the numerical value of the option argument that may be\n\ | 1972 Return the numerical value of the option argument that may be\n\ |
1956 passed to @code{waitpid} to indicate that it should also return\n\ | 1973 passed to @code{waitpid} to indicate that it should also return if a stopped\n\ |
1957 if a stopped child has been resumed by delivery of a @code{SIGCONT}\n\ | 1974 child has been resumed by delivery of a @code{SIGCONT} signal.\n\ |
1958 signal.\n\ | |
1959 @seealso{waitpid, WNOHANG, WUNTRACED}\n\ | 1975 @seealso{waitpid, WNOHANG, WUNTRACED}\n\ |
1960 @end deftypefn") | 1976 @end deftypefn") |
1961 { | 1977 { |
1962 return const_value (args, WCONTINUE); | 1978 return const_value (args, WCONTINUE); |
1963 } | 1979 } |