2006-04-12 08:29:21 +02:00
|
|
|
@c -*- mode: texinfo -*-
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension {struct pex_obj *} pex_init (int @var{flags}, @
|
|
|
|
const char *@var{pname}, const char *@var{tempbase})
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
Prepare to execute one or more programs, with standard output of each
|
|
|
|
program fed to standard input of the next. This is a system
|
|
|
|
independent interface to execute a pipeline.
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@var{flags} is a bitwise combination of the following:
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@table @code
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@vindex PEX_RECORD_TIMES
|
|
|
|
@item PEX_RECORD_TIMES
|
|
|
|
Record subprocess times if possible.
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@vindex PEX_USE_PIPES
|
|
|
|
@item PEX_USE_PIPES
|
|
|
|
Use pipes for communication between processes, if possible.
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@vindex PEX_SAVE_TEMPS
|
|
|
|
@item PEX_SAVE_TEMPS
|
|
|
|
Don't delete temporary files used for communication between
|
|
|
|
processes.
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@end table
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@var{pname} is the name of program to be executed, used in error
|
|
|
|
messages. @var{tempbase} is a base name to use for any required
|
|
|
|
temporary files; it may be @code{NULL} to use a randomly chosen name.
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
|
|
|
@end deftypefn
|
|
|
|
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension {const char *} pex_run (struct pex_obj *@var{obj}, @
|
|
|
|
int @var{flags}, const char *@var{executable}, char * const *@var{argv}, @
|
|
|
|
const char *@var{outname}, const char *@var{errname}, int *@var{err})
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
|
|
|
|
Execute one program in a pipeline. On success this returns
|
|
|
|
@code{NULL}. On failure it returns an error message, a statically
|
|
|
|
allocated string.
|
|
|
|
|
|
|
|
@var{obj} is returned by a previous call to @code{pex_init}.
|
|
|
|
|
|
|
|
@var{flags} is a bitwise combination of the following:
|
|
|
|
|
|
|
|
@table @code
|
|
|
|
|
|
|
|
@vindex PEX_LAST
|
|
|
|
@item PEX_LAST
|
|
|
|
This must be set on the last program in the pipeline. In particular,
|
|
|
|
it should be set when executing a single program. The standard output
|
|
|
|
of the program will be sent to @var{outname}, or, if @var{outname} is
|
2005-05-15 18:35:44 +02:00
|
|
|
@code{NULL}, to the standard output of the calling program. Do @emph{not}
|
|
|
|
set this bit if you want to call @code{pex_read_output}
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
(described below). After a call to @code{pex_run} with this bit set,
|
|
|
|
@var{pex_run} may no longer be called with the same @var{obj}.
|
|
|
|
|
|
|
|
@vindex PEX_SEARCH
|
|
|
|
@item PEX_SEARCH
|
|
|
|
Search for the program using the user's executable search path.
|
|
|
|
|
|
|
|
@vindex PEX_SUFFIX
|
|
|
|
@item PEX_SUFFIX
|
|
|
|
@var{outname} is a suffix. See the description of @var{outname},
|
|
|
|
below.
|
|
|
|
|
|
|
|
@vindex PEX_STDERR_TO_STDOUT
|
|
|
|
@item PEX_STDERR_TO_STDOUT
|
|
|
|
Send the program's standard error to standard output, if possible.
|
|
|
|
|
|
|
|
@vindex PEX_BINARY_INPUT
|
|
|
|
@vindex PEX_BINARY_OUTPUT
|
2007-01-31 19:40:34 +01:00
|
|
|
@vindex PEX_BINARY_ERROR
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@item PEX_BINARY_INPUT
|
|
|
|
@itemx PEX_BINARY_OUTPUT
|
2007-01-31 19:40:34 +01:00
|
|
|
@itemx PEX_BINARY_ERROR
|
|
|
|
The standard input (output or error) of the program should be read (written) in
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
binary mode rather than text mode. These flags are ignored on systems
|
|
|
|
which do not distinguish binary mode and text mode, such as Unix. For
|
2005-05-15 18:35:44 +02:00
|
|
|
proper behavior these flags should match appropriately---a call to
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@code{pex_run} using @code{PEX_BINARY_OUTPUT} should be followed by a
|
|
|
|
call using @code{PEX_BINARY_INPUT}.
|
2007-01-31 19:40:34 +01:00
|
|
|
|
|
|
|
@vindex PEX_STDERR_TO_PIPE
|
|
|
|
@item PEX_STDERR_TO_PIPE
|
|
|
|
Send the program's standard error to a pipe, if possible. This flag
|
|
|
|
cannot be specified together with @code{PEX_STDERR_TO_STDOUT}. This
|
|
|
|
flag can be specified only on the last program in pipeline.
|
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@end table
|
|
|
|
|
|
|
|
@var{executable} is the program to execute. @var{argv} is the set of
|
|
|
|
arguments to pass to the program; normally @code{@var{argv}[0]} will
|
|
|
|
be a copy of @var{executable}.
|
|
|
|
|
|
|
|
@var{outname} is used to set the name of the file to use for standard
|
2005-05-15 18:35:44 +02:00
|
|
|
output. There are two cases in which no output file will be used:
|
|
|
|
|
|
|
|
@enumerate
|
|
|
|
@item
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
if @code{PEX_LAST} is not set in @var{flags}, and @code{PEX_USE_PIPES}
|
2005-05-15 18:35:44 +02:00
|
|
|
was set in the call to @code{pex_init}, and the system supports pipes
|
|
|
|
|
|
|
|
@item
|
|
|
|
if @code{PEX_LAST} is set in @var{flags}, and @var{outname} is
|
|
|
|
@code{NULL}
|
|
|
|
@end enumerate
|
|
|
|
|
|
|
|
@noindent
|
|
|
|
Otherwise the code will use a file to hold standard
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
output. If @code{PEX_LAST} is not set, this file is considered to be
|
|
|
|
a temporary file, and it will be removed when no longer needed, unless
|
|
|
|
@code{PEX_SAVE_TEMPS} was set in the call to @code{pex_init}.
|
|
|
|
|
|
|
|
There are two cases to consider when setting the name of the file to
|
|
|
|
hold standard output.
|
|
|
|
|
2005-05-15 18:35:44 +02:00
|
|
|
@enumerate
|
|
|
|
@item
|
|
|
|
@code{PEX_SUFFIX} is set in @var{flags}. In this case
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@var{outname} may not be @code{NULL}. If the @var{tempbase} parameter
|
|
|
|
to @code{pex_init} was not @code{NULL}, then the output file name is
|
|
|
|
the concatenation of @var{tempbase} and @var{outname}. If
|
|
|
|
@var{tempbase} was @code{NULL}, then the output file name is a random
|
|
|
|
file name ending in @var{outname}.
|
|
|
|
|
2005-05-15 18:35:44 +02:00
|
|
|
@item
|
|
|
|
@code{PEX_SUFFIX} was not set in @var{flags}. In this
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
case, if @var{outname} is not @code{NULL}, it is used as the output
|
|
|
|
file name. If @var{outname} is @code{NULL}, and @var{tempbase} was
|
|
|
|
not NULL, the output file name is randomly chosen using
|
|
|
|
@var{tempbase}. Otherwise the output file name is chosen completely
|
|
|
|
at random.
|
2005-05-15 18:35:44 +02:00
|
|
|
@end enumerate
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
|
|
|
|
@var{errname} is the file name to use for standard error output. If
|
2005-05-15 18:35:44 +02:00
|
|
|
it is @code{NULL}, standard error is the same as the caller's.
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
Otherwise, standard error is written to the named file.
|
|
|
|
|
|
|
|
On an error return, the code sets @code{*@var{err}} to an @code{errno}
|
|
|
|
value, or to 0 if there is no relevant @code{errno}.
|
|
|
|
|
|
|
|
@end deftypefn
|
|
|
|
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension {const char *} pex_run_in_environment (struct pex_obj *@var{obj}, @
|
|
|
|
int @var{flags}, const char *@var{executable}, char * const *@var{argv}, @
|
|
|
|
char * const *@var{env}, int @var{env_size}, const char *@var{outname}, @
|
|
|
|
const char *@var{errname}, int *@var{err})
|
2006-06-01 12:30:51 +02:00
|
|
|
|
|
|
|
Execute one program in a pipeline, permitting the environment for the
|
|
|
|
program to be specified. Behaviour and parameters not listed below are
|
|
|
|
as for @code{pex_run}.
|
|
|
|
|
|
|
|
@var{env} is the environment for the child process, specified as an array of
|
|
|
|
character pointers. Each element of the array should point to a string of the
|
|
|
|
form @code{VAR=VALUE}, with the exception of the last element that must be
|
|
|
|
@code{NULL}.
|
|
|
|
|
|
|
|
@end deftypefn
|
|
|
|
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension {FILE *} pex_input_file (struct pex_obj *@var{obj}, @
|
|
|
|
int @var{flags}, const char *@var{in_name})
|
2006-04-12 08:29:21 +02:00
|
|
|
|
|
|
|
Return a stream for a temporary file to pass to the first program in
|
|
|
|
the pipeline as input.
|
|
|
|
|
|
|
|
The name of the input file is chosen according to the same rules
|
|
|
|
@code{pex_run} uses to choose output file names, based on
|
|
|
|
@var{in_name}, @var{obj} and the @code{PEX_SUFFIX} bit in @var{flags}.
|
|
|
|
|
|
|
|
Don't call @code{fclose} on the returned stream; the first call to
|
|
|
|
@code{pex_run} closes it automatically.
|
|
|
|
|
|
|
|
If @var{flags} includes @code{PEX_BINARY_OUTPUT}, open the stream in
|
|
|
|
binary mode; otherwise, open it in the default mode. Including
|
|
|
|
@code{PEX_BINARY_OUTPUT} in @var{flags} has no effect on Unix.
|
|
|
|
@end deftypefn
|
|
|
|
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension {FILE *} pex_input_pipe (struct pex_obj *@var{obj}, @
|
|
|
|
int @var{binary})
|
2006-04-12 08:29:21 +02:00
|
|
|
|
|
|
|
Return a stream @var{fp} for a pipe connected to the standard input of
|
|
|
|
the first program in the pipeline; @var{fp} is opened for writing.
|
|
|
|
You must have passed @code{PEX_USE_PIPES} to the @code{pex_init} call
|
|
|
|
that returned @var{obj}.
|
|
|
|
|
|
|
|
You must close @var{fp} using @code{fclose} yourself when you have
|
|
|
|
finished writing data to the pipeline.
|
|
|
|
|
|
|
|
The file descriptor underlying @var{fp} is marked not to be inherited
|
|
|
|
by child processes.
|
|
|
|
|
|
|
|
On systems that do not support pipes, this function returns
|
|
|
|
@code{NULL}, and sets @code{errno} to @code{EINVAL}. If you would
|
|
|
|
like to write code that is portable to all systems the @code{pex}
|
|
|
|
functions support, consider using @code{pex_input_file} instead.
|
|
|
|
|
|
|
|
There are two opportunities for deadlock using
|
|
|
|
@code{pex_input_pipe}:
|
|
|
|
|
|
|
|
@itemize @bullet
|
|
|
|
@item
|
|
|
|
Most systems' pipes can buffer only a fixed amount of data; a process
|
|
|
|
that writes to a full pipe blocks. Thus, if you write to @file{fp}
|
|
|
|
before starting the first process, you run the risk of blocking when
|
|
|
|
there is no child process yet to read the data and allow you to
|
|
|
|
continue. @code{pex_input_pipe} makes no promises about the
|
|
|
|
size of the pipe's buffer, so if you need to write any data at all
|
|
|
|
before starting the first process in the pipeline, consider using
|
|
|
|
@code{pex_input_file} instead.
|
|
|
|
|
|
|
|
@item
|
|
|
|
Using @code{pex_input_pipe} and @code{pex_read_output} together
|
|
|
|
may also cause deadlock. If the output pipe fills up, so that each
|
|
|
|
program in the pipeline is waiting for the next to read more data, and
|
|
|
|
you fill the input pipe by writing more data to @var{fp}, then there
|
|
|
|
is no way to make progress: the only process that could read data from
|
|
|
|
the output pipe is you, but you are blocked on the input pipe.
|
|
|
|
|
|
|
|
@end itemize
|
|
|
|
|
|
|
|
@end deftypefn
|
|
|
|
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension {FILE *} pex_read_output (struct pex_obj *@var{obj}, @
|
|
|
|
int @var{binary})
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
|
|
|
|
Returns a @code{FILE} pointer which may be used to read the standard
|
|
|
|
output of the last program in the pipeline. When this is used,
|
|
|
|
@code{PEX_LAST} should not be used in a call to @code{pex_run}. After
|
|
|
|
this is called, @code{pex_run} may no longer be called with the same
|
|
|
|
@var{obj}. @var{binary} should be non-zero if the file should be
|
|
|
|
opened in binary mode. Don't call @code{fclose} on the returned file;
|
|
|
|
it will be closed by @code{pex_free}.
|
|
|
|
|
|
|
|
@end deftypefn
|
|
|
|
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension {FILE *} pex_read_err (struct pex_obj *@var{obj}, @
|
|
|
|
int @var{binary})
|
2007-01-31 19:40:34 +01:00
|
|
|
|
|
|
|
Returns a @code{FILE} pointer which may be used to read the standard
|
|
|
|
error of the last program in the pipeline. When this is used,
|
|
|
|
@code{PEX_LAST} should not be used in a call to @code{pex_run}. After
|
|
|
|
this is called, @code{pex_run} may no longer be called with the same
|
|
|
|
@var{obj}. @var{binary} should be non-zero if the file should be
|
|
|
|
opened in binary mode. Don't call @code{fclose} on the returned file;
|
|
|
|
it will be closed by @code{pex_free}.
|
|
|
|
|
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension int pex_get_status (struct pex_obj *@var{obj}, @
|
|
|
|
int @var{count}, int *@var{vector})
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
|
|
|
|
Returns the exit status of all programs run using @var{obj}.
|
|
|
|
@var{count} is the number of results expected. The results will be
|
|
|
|
placed into @var{vector}. The results are in the order of the calls
|
|
|
|
to @code{pex_run}. Returns 0 on error, 1 on success.
|
|
|
|
|
|
|
|
@end deftypefn
|
|
|
|
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension int pex_get_times (struct pex_obj *@var{obj}, @
|
|
|
|
int @var{count}, struct pex_time *@var{vector})
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
Returns the process execution times of all programs run using
|
|
|
|
@var{obj}. @var{count} is the number of results expected. The
|
|
|
|
results will be placed into @var{vector}. The results are in the
|
|
|
|
order of the calls to @code{pex_run}. Returns 0 on error, 1 on
|
|
|
|
success.
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
2005-05-15 18:35:44 +02:00
|
|
|
@code{struct pex_time} has the following fields of the type
|
|
|
|
@code{unsigned long}: @code{user_seconds},
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@code{user_microseconds}, @code{system_seconds},
|
|
|
|
@code{system_microseconds}. On systems which do not support reporting
|
|
|
|
process times, all the fields will be set to @code{0}.
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Extension void pex_free (struct pex_obj @var{obj})
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
2007-09-06 18:58:57 +02:00
|
|
|
Clean up and free all data associated with @var{obj}. If you have not
|
|
|
|
yet called @code{pex_get_times} or @code{pex_get_status}, this will
|
|
|
|
try to kill the subprocesses.
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
|
|
|
@end deftypefn
|
|
|
|
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension {const char *} pex_one (int @var{flags}, @
|
|
|
|
const char *@var{executable}, char * const *@var{argv}, @
|
|
|
|
const char *@var{pname}, const char *@var{outname}, const char *@var{errname}, @
|
|
|
|
int *@var{status}, int *@var{err})
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
|
2005-05-15 18:35:44 +02:00
|
|
|
An interface to permit the easy execution of a
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
single program. The return value and most of the parameters are as
|
|
|
|
for a call to @code{pex_run}. @var{flags} is restricted to a
|
|
|
|
combination of @code{PEX_SEARCH}, @code{PEX_STDERR_TO_STDOUT}, and
|
|
|
|
@code{PEX_BINARY_OUTPUT}. @var{outname} is interpreted as if
|
2005-05-15 18:35:44 +02:00
|
|
|
@code{PEX_LAST} were set. On a successful return, @code{*@var{status}} will
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
be set to the exit status of the program.
|
|
|
|
|
|
|
|
@end deftypefn
|
|
|
|
|
libiberty: documentation markup and order fixes.
libiberty/:
* splay-tree.c: Escape wrapping newlines in texinfo markup
with '@', to fix function declaration output rendering.
* gather-docs: Relax and improve macro name matching to actually
match all current names and to allow input line wrapping.
* bsearch.c, concat.c, crc32.c, fnmatch.txh, fopen_unlocked.c,
hashtab.c, insque.c, make-relative-prefix.c, memchr.c, memcmp.c,
memcpy.c, memmem.c, memmove.c, mempcpy.c, memset.c,
pexecute.txh, random.c, setenv.c, setproctitle.c,
simple-object.txh, snprintf.c, stpncpy.c, strncmp.c, strtod.c,
strtol.c, vasprintf.c, vprintf.c, vsnprintf.c, xmemdup.c:
Wrap long texinfo input lines.
* functions.texi: Regenerate.
From-SVN: r169783
2011-02-03 08:23:20 +01:00
|
|
|
@deftypefn Extension int pexecute (const char *@var{program}, @
|
|
|
|
char * const *@var{argv}, const char *@var{this_pname}, @
|
|
|
|
const char *@var{temp_base}, char **@var{errmsg_fmt}, @
|
|
|
|
char **@var{errmsg_arg}, int @var{flags})
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
This is the old interface to execute one or more programs. It is
|
|
|
|
still supported for compatibility purposes, but is no longer
|
|
|
|
documented.
|
Makefile.in (CFILES): Add pex-*.c.
* Makefile.in (CFILES): Add pex-*.c.
(REQUIRED_OFILES): Change pexecute.o to @pexecute@
(CONFIGURED_OFILES): Add pex-*.o.
(TEXIFILES): Add pexecute.txh.
(pexecute.o): Delete rule.
(pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
pex-unix.o, pex-win32.o): New rules.
* configure.in: Change AC_INIT argument to xmalloc.c.
Compute appropriate pexecute implementation and substitute it
as @pexecute@.
* pexecute.c: Split up into...
* pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
new files.
* functions.texi: Regenerate.
* configure: Regenerate.
From-SVN: r61728
2003-01-24 21:02:11 +01:00
|
|
|
|
pex-common.c: New file.
libiberty:
* pex-common.c: New file.
* pex-one.c: New file.
* pexecute.c: New file.
* pex-common.h: Include <stdio.h>.
(struct pex_obj): Define.
(struct pex_funcs): Define.
(pex_init_common): Declare.
* pex-unix.c: Rewrite.
* pex-win32.c: Rewrite.
* pex-djgpp.c: Rewrite.
* pex-msdos.c: Rewrite.
* testsuite/text-pexecute.c: New file.
* pexecute.txh: Rewrite.
* configure.ac: Check for wait3 and wait4. Set CHECK to
really-check rather than check-cplus-dem.
* functions.texi: Rebuild.
* Makefile.in: Rebuild dependencies.
(CFILES): Add pexecute.c, pex-common.c, pex-one.c.
(REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o.
* testsuite/Makefile.in (really-check): New target.
(check-pexecute, test-pexecute): New targets.
* configure: Rebuild.
include:
* libiberty.h: Include <stdio.h>.
(PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define.
(PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define.
(PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define.
(pex_init, pex_run, pex_read_output): Declare.
(pex_get_status, pex_get_times, pex_free, pex_one): Declare.
(struct pex_time): Define.
From-SVN: r97148
2005-03-29 04:08:46 +02:00
|
|
|
@end deftypefn
|
|
|
|
|
|
|
|
@deftypefn Extension int pwait (int @var{pid}, int *@var{status}, int @var{flags})
|
|
|
|
|
|
|
|
Another part of the old execution interface.
|
|
|
|
|
|
|
|
@end deftypefn
|