comparison lib/pipe.h @ 30221:d638c278c6d6

Add comment about SIGPIPE.
author Bruno Haible <bruno@clisp.org>
date Sun, 28 Sep 2008 16:07:52 +0200
parents 49d1cc4454bf
children dad85cd90e2e
comparison
equal deleted inserted replaced
30220:b7630b904ebd 30221:d638c278c6d6
1 /* Creation of subprocesses, communicating via pipes. 1 /* Creation of subprocesses, communicating via pipes.
2 Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc. 2 Copyright (C) 2001-2003, 2006, 2008 Free Software Foundation, Inc.
3 Written by Bruno Haible <haible@clisp.cons.org>, 2001. 3 Written by Bruno Haible <haible@clisp.cons.org>, 2001.
4 4
5 This program is free software: you can redistribute it and/or modify 5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3 of the License, or 7 the Free Software Foundation; either version 3 of the License, or
76 * The child's stdout goes to a file. 76 * The child's stdout goes to a file.
77 * 77 *
78 * write system read 78 * write system read
79 * parent -> fd[0] -> STDIN_FILENO -> child 79 * parent -> fd[0] -> STDIN_FILENO -> child
80 * 80 *
81 * Note: When writing to a child process, it is useful to ignore the SIGPIPE
82 * signal and the EPIPE error code.
81 */ 83 */
82 extern pid_t create_pipe_out (const char *progname, 84 extern pid_t create_pipe_out (const char *progname,
83 const char *prog_path, char **prog_argv, 85 const char *prog_path, char **prog_argv,
84 const char *prog_stdout, bool null_stderr, 86 const char *prog_stdout, bool null_stderr,
85 bool slave_process, bool exit_on_error, 87 bool slave_process, bool exit_on_error,
103 * write system read 105 * write system read
104 * parent -> fd[1] -> STDIN_FILENO -> child 106 * parent -> fd[1] -> STDIN_FILENO -> child
105 * parent <- fd[0] <- STDOUT_FILENO <- child 107 * parent <- fd[0] <- STDOUT_FILENO <- child
106 * read system write 108 * read system write
107 * 109 *
110 * Note: When writing to a child process, it is useful to ignore the SIGPIPE
111 * signal and the EPIPE error code.
108 */ 112 */
109 extern pid_t create_pipe_bidi (const char *progname, 113 extern pid_t create_pipe_bidi (const char *progname,
110 const char *prog_path, char **prog_argv, 114 const char *prog_path, char **prog_argv,
111 bool null_stderr, 115 bool null_stderr,
112 bool slave_process, bool exit_on_error, 116 bool slave_process, bool exit_on_error,