1
1

Protect against problems if someone passes us thru a pipe and then abnormally terminates the pipe early

This commit was SVN r32189.
Этот коммит содержится в:
Ralph Castain 2014-07-09 22:41:53 +00:00
родитель 7beb8f6799
Коммит 796f57f709
3 изменённых файлов: 24 добавлений и 0 удалений

Просмотреть файл

@ -13,6 +13,7 @@
* Copyright (c) 2011-2012 University of Houston. All rights reserved.
* Copyright (c) 2010-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -35,6 +36,9 @@
#include <sys/param.h>
#endif
#include <errno.h>
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
#include "opal/version.h"
#include "opal/mca/installdirs/installdirs.h"
@ -74,6 +78,10 @@ int main(int argc, char *argv[])
opal_pointer_array_t component_map;
opal_info_component_map_t *map;
/* protect against problems if someone passes us thru a pipe
* and then abnormally terminates the pipe early */
signal(SIGPIPE, SIG_IGN);
/* Initialize the argv parsing handle */
if (OPAL_SUCCESS != opal_init_util(&argc, &argv)) {
opal_show_help("help-opal_info.txt", "lib-call-fail", true,

Просмотреть файл

@ -12,6 +12,7 @@
* Copyright (c) 2007-2012 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2010-2013 Los Alamos National Security, LLC.
* All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
@ -34,6 +35,9 @@
#include <sys/param.h>
#endif
#include <errno.h>
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
#include "opal/mca/installdirs/installdirs.h"
#include "opal/class/opal_object.h"
@ -77,6 +81,10 @@ int main(int argc, char *argv[])
int i, len;
char *str;
/* protect against problems if someone passes us thru a pipe
* and then abnormally terminates the pipe early */
signal(SIGPIPE, SIG_IGN);
/* Initialize the argv parsing handle */
if (ORTE_SUCCESS != opal_init_util(&argc, &argv)) {
orte_show_help("help-orte-info.txt", "lib-call-fail", true,

Просмотреть файл

@ -1,6 +1,7 @@
/*
* Copyright (c) 2013 Mellanox Technologies, Inc.
* All rights reserved.
* Copyright (c) 2014 Intel, Inc. All rights reserved.
*
* $COPYRIGHT$
*
@ -24,6 +25,9 @@
#include <sys/param.h>
#endif
#include <errno.h>
#ifdef HAVE_SIGNAL_H
#include <signal.h>
#endif
#include "opal/version.h"
#include "opal/mca/installdirs/installdirs.h"
@ -65,6 +69,10 @@ int main(int argc, char *argv[])
opal_pointer_array_t component_map;
opal_info_component_map_t *map;
/* protect against problems if someone passes us thru a pipe
* and then abnormally terminates the pipe early */
signal(SIGPIPE, SIG_IGN);
/* Initialize the argv parsing handle */
if (OPAL_SUCCESS != opal_init_util(&argc, &argv)) {
opal_show_help("help-opal_info.txt", "lib-call-fail", true,