[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SIGPIPE recommendation
From: |
Bruno Haible |
Subject: |
SIGPIPE recommendation |
Date: |
Sun, 28 Sep 2008 16:07:44 +0200 |
User-agent: |
KMail/1.5.4 |
Processes that write to subprocesses through pipes usually need to ignore
SIGPIPE while doing so. I'm adding a reminder comment.
2008-09-28 Bruno Haible <address@hidden>
* lib/pipe.h (create_pipe_out, create_pipe_bidi): Add comment about
SIGPIPE.
--- lib/pipe.h.orig 2008-09-28 16:05:57.000000000 +0200
+++ lib/pipe.h 2008-09-28 16:02:47.000000000 +0200
@@ -1,5 +1,5 @@
/* Creation of subprocesses, communicating via pipes.
- Copyright (C) 2001-2003, 2006 Free Software Foundation, Inc.
+ Copyright (C) 2001-2003, 2006, 2008 Free Software Foundation, Inc.
Written by Bruno Haible <address@hidden>, 2001.
This program is free software: you can redistribute it and/or modify
@@ -78,6 +78,8 @@
* write system read
* parent -> fd[0] -> STDIN_FILENO -> child
*
+ * Note: When writing to a child process, it is useful to ignore the SIGPIPE
+ * signal and the EPIPE error code.
*/
extern pid_t create_pipe_out (const char *progname,
const char *prog_path, char **prog_argv,
@@ -105,6 +107,8 @@
* parent <- fd[0] <- STDOUT_FILENO <- child
* read system write
*
+ * Note: When writing to a child process, it is useful to ignore the SIGPIPE
+ * signal and the EPIPE error code.
*/
extern pid_t create_pipe_bidi (const char *progname,
const char *prog_path, char **prog_argv,
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- SIGPIPE recommendation,
Bruno Haible <=