Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 10:47:27

0001 /*
0002  * Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
0003  *                         University Research and Technology
0004  *                         Corporation.  All rights reserved.
0005  * Copyright (c) 2004-2005 The University of Tennessee and The University
0006  *                         of Tennessee Research Foundation.  All rights
0007  *                         reserved.
0008  * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
0009  *                         University of Stuttgart.  All rights reserved.
0010  * Copyright (c) 2004-2005 The Regents of the University of California.
0011  *                         All rights reserved.
0012  * Copyright (c) 2019-2020 Intel, Inc.  All rights reserved.
0013  * Copyright (c) 2022      Nanook Consulting.  All rights reserved.
0014  * $COPYRIGHT$
0015  *
0016  * Additional copyrights may follow
0017  *
0018  * $HEADER$
0019  */
0020 
0021 #ifndef PMIX_FEW_H
0022 #define PMIX_FEW_H
0023 
0024 #include "pmix_config.h"
0025 
0026 #include "pmix_common.h"
0027 
0028 BEGIN_C_DECLS
0029 
0030 /**
0031  *  Forks, execs, and waits for a subordinate program
0032  *
0033  * @param argv Null-terminated argument vector; argv[0] is the program
0034  * (same as arguments to execvp())
0035  *
0036  * @param status Upon success, will be filled with the return status
0037  * from waitpid(2).  The WIF* macros can be used to examine the value
0038  * (see waitpid(2)).
0039  *
0040  * @retval PMIX_SUCCESS If the child launched and exited.
0041  * @retval PMIX_ERROR If a failure occurred, errno should be
0042  * examined for the specific error.
0043  *
0044  * This function forks, execs, and waits for an executable to
0045  * complete.  The input argv must be a NULL-terminated array (perhaps
0046  * built with the pmix_arr_*() interface).  Upon success, PMIX_SUCCESS
0047  * is returned.  This function will wait either until the child
0048  * process has exited or waitpid() returns an error other than EINTR.
0049  *
0050  * Note that a return of PMIX_SUCCESS does \em not imply that the child
0051  * process exited successfully -- it simply indicates that the child
0052  * process exited.  The WIF* macros (see waitpid(2)) should be used to
0053  * examine the status to see hold the child exited.
0054  *
0055  * \warning This function should not be called if \c orte_init()
0056  *          or \c MPI_Init() have been called.  This function is not
0057  *          safe in a multi-threaded environment in which a handler
0058  *          for \c SIGCHLD has been registered.
0059  */
0060 PMIX_EXPORT pmix_status_t pmix_few(char *argv[], int *status);
0061 
0062 END_C_DECLS
0063 #endif /* PMIX_FEW_H */