From f6cfb13f55f00086f136ba653c77c01b58205322 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 2 Aug 2000 21:20:32 +0000 Subject: Update. * posix/regex.c (compile_range): Transliate range start and end characters to avoid empty range in case of REG_ICASE [PR libc/1842]. --- manual/examples/popen.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'manual') diff --git a/manual/examples/popen.c b/manual/examples/popen.c index 16ae32f..1b9ee82 100644 --- a/manual/examples/popen.c +++ b/manual/examples/popen.c @@ -1,7 +1,7 @@ #include #include -void +void write_data (FILE * stream) { int i; @@ -23,11 +23,16 @@ main (void) output = popen ("more", "w"); if (!output) { - fprintf (stderr, "Could not run more.\n"); + fprintf (stderr, + "incorrect parameters or too many files.\n"); return EXIT_FAILURE; } write_data (output); - pclose (output); + if (pclose (output) != 0) + { + fprintf (stderr, + "Could not run more or other error.\n"); + } return EXIT_SUCCESS; } /*@end group*/ -- cgit v1.1