Remove a compiler warning by defining the signal_cb function as static.
And remove a segfault on ompi_info by insuring the the event library is initialized before we add events inside. This commit was SVN r2767.
Этот коммит содержится в:
родитель
50a8bee21a
Коммит
b4c49e057a
@ -20,8 +20,7 @@
|
|||||||
|
|
||||||
#include "mca/pcm/base/static-components.h"
|
#include "mca/pcm/base/static-components.h"
|
||||||
|
|
||||||
|
static void
|
||||||
void
|
|
||||||
signal_cb(int fd, short event, void *arg)
|
signal_cb(int fd, short event, void *arg)
|
||||||
{
|
{
|
||||||
struct ompi_event *signal = arg;
|
struct ompi_event *signal = arg;
|
||||||
@ -49,7 +48,8 @@ int mca_pcm_base_open(void)
|
|||||||
struct ompi_event *signal_int;
|
struct ompi_event *signal_int;
|
||||||
signal_int = malloc(sizeof(struct ompi_event));
|
signal_int = malloc(sizeof(struct ompi_event));
|
||||||
|
|
||||||
/* Initalize one event */
|
/* Initalize one event (only after the event library was initialized) */
|
||||||
|
ompi_event_init();
|
||||||
ompi_event_set(signal_int, SIGHUP, OMPI_EV_SIGNAL|OMPI_EV_PERSIST, signal_cb,
|
ompi_event_set(signal_int, SIGHUP, OMPI_EV_SIGNAL|OMPI_EV_PERSIST, signal_cb,
|
||||||
signal_int);
|
signal_int);
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user