Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Message-Id: In-Reply-To: References: Date: Fri, 18 Oct 2013 14:50:09 +0200 From: Kim De Mey Subject: [Xenomai] [PATCH 2 of 2] Xenomai-forge notifier_init: panic on failed pipe List-Id: Discussions about the Xenomai project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: xenomai@xenomai.org Panic if one of the pipe() system calls fails. To indicate that there is an underlying problem. Signed-off-by: Kim De Mey --- lib/copperplate/notifier.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/copperplate/notifier.c b/lib/copperplate/notifier.c --- a/lib/copperplate/notifier.c +++ b/lib/copperplate/notifier.c @@ -144,12 +144,12 @@ int notifier_init(struct notifier *nf, int fd; if (pipe(nf->psfd) < 0) - return __bt(-errno); + panic("failed to create file descriptors"); if (pipe(nf->pwfd) < 0) { __STD(close(nf->psfd[0])); __STD(close(nf->psfd[1])); - return __bt(-errno); + panic("failed to create file descriptors"); } nf->callback = callback;