Mercurial > hg > octave-lojdl > gnulib-hg
view modules/popen-safer @ 11850:9ebc8e9eca64
popen-safer: prevent popen from clobbering std descriptors
* modules/popen-safer: New file.
* lib/popen-safer.c: Likewise.
* m4/stdio-safer.m4 (gl_POPEN_SAFER): New macro.
* lib/stdio--.h (popen): Provide override.
* lib/stdio-safer.h (popen_safer): Provide declaration.
* tests/test-popen.c (includes): Partially test this.
* modules/popen-safer-tests: New file, for more tests.
* tests/test-popen-safer.c: Likewise.
* MODULES.html.sh (file stream based Input/Output): Mention it.
Signed-off-by: Eric Blake <ebb9@byu.net>
author | Eric Blake <ebb9@byu.net> |
---|---|
date | Wed, 19 Aug 2009 10:02:19 -0600 |
parents | |
children | 6a3afd222026 |
line wrap: on
line source
Description: popen function that avoids clobbering std{in,out,err}. Files: lib/stdio--.h lib/stdio-safer.h lib/popen-safer.c m4/stdio-safer.m4 Depends-on: cloexec open popen unistd-safer configure.ac: gl_POPEN_SAFER gl_MODULE_INDICATOR([popen-safer]) Makefile.am: Include: "stdio-safer.h" License: GPL Maintainer: Eric Blake