From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <52612F95.1080204@xenomai.org> Date: Fri, 18 Oct 2013 14:54:45 +0200 From: Philippe Gerum MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [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: Kim De Mey , xenomai@xenomai.org On 10/18/2013 02:50 PM, Kim De Mey wrote: > 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; > Nack. This routine returns a status code, the caller should check it. -- Philippe.