1
1

Sigh. It helps when you commit the right version of the finished

code.

This commit fixes minor errors in the incorrectly-committed r31513
(new fd close-on-exec convenience function).

Refs trac:4550

This commit was SVN r31514.

The following SVN revision numbers were found above:
  r31513 --> open-mpi/ompi@e1655ae68d

The following Trac tickets were found above:
  Ticket 4550 --> https://svn.open-mpi.org/trac/ompi/ticket/4550
Этот коммит содержится в:
Jeff Squyres 2014-04-24 13:20:32 +00:00
родитель e1655ae68d
Коммит 790cdb5cc7
2 изменённых файлов: 5 добавлений и 4 удалений

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

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008-2009 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2009 Sandia National Laboratories. All rights reserved.
*
* $COPYRIGHT$
@ -15,6 +15,7 @@
#include <unistd.h>
#endif
#include <errno.h>
#include <fcntl.h>
#include "opal/util/fd.h"
#include "opal/constants.h"
@ -76,12 +77,12 @@ int opal_fd_set_cloexec(int fd)
/* Stevens says that we should get the fd's flags before we set
them. So say we all. */
flags = fcntl(sd, F_GETFD, 0);
flags = fcntl(fd, F_GETFD, 0);
if (-1 == flags) {
return OPAL_ERR_IN_ERRNO;
}
if (fcntl(sd, F_SETFD, FD_CLOEXEC | flags) == -1) {
if (fcntl(fd, F_SETFD, FD_CLOEXEC | flags) == -1) {
return OPAL_ERR_IN_ERRNO;
}
#endif

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

@ -1,5 +1,5 @@
/*
* Copyright (c) 2008-2010 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2008-2014 Cisco Systems, Inc. All rights reserved.
* Copyright (c) 2009 Sandia National Laboratories. All rights reserved.
*
* $COPYRIGHT$