Tizen RT Libs&Environment  v1.1 D4

Provides APIs for Spawn. More...

Collaboration diagram for SPAWN:

Data Structures

struct  posix_spawnattr_s
 Structure of posix_spawn attributes. More...
 
struct  spawn_general_file_action_s
 structure for general file action More...
 
struct  spawn_close_file_action_s
 structure for spawn close file action More...
 
struct  spawn_dup2_file_action_s
 structure for spawn dup2 file action More...
 
struct  spawn_open_file_action_s
 structure for spawn open file action More...
 

Macros

#define CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE   2048
 
#define POSIX_SPAWN_RESETIDS   (1 << 0) /* 1: Reset effective user ID */
 
#define POSIX_SPAWN_SETPGROUP   (1 << 1) /* 1: Set process group */
 
#define POSIX_SPAWN_SETSCHEDPARAM   (1 << 2) /* 1: Set task's priority */
 
#define POSIX_SPAWN_SETSCHEDULER   (1 << 3) /* 1: Set task's scheduler policy */
 
#define POSIX_SPAWN_SETSIGDEF   (1 << 4) /* 1: Set default signal actions */
 
#define POSIX_SPAWN_SETSIGMASK   (1 << 5) /* 1: Set sigmask */
 
#define posix_spawnattr_destroy(attr)   (attr ? 0 : EINVAL)
 
#define posix_spawnattr_getpgroup(attr, group)   (ENOSYS)
 
#define posix_spawnattr_getsigdefault(attr, sigdefault)   (ENOSYS)
 
#define posix_spawnattr_setpgroup(attr, group)   (ENOSYS)
 
#define posix_spawnattr_setsigdefault(attr, sigdefault)   (ENOSYS)
 

Typedefs

typedef struct posix_spawnattr_s posix_spawnattr_t
 
typedef FAR void * posix_spawn_file_actions_t
 

Enumerations

enum  spawn_file_actions_e { SPAWN_FILE_ACTION_NONE = 0, SPAWN_FILE_ACTION_CLOSE, SPAWN_FILE_ACTION_DUP2, SPAWN_FILE_ACTION_OPEN }
 enum of spawn_file_action More...
 

Functions

int posix_spawn_file_actions_init (FAR posix_spawn_file_actions_t *file_actions)
 initialize spawn file actions object More...
 
int posix_spawn_file_actions_destroy (FAR posix_spawn_file_actions_t *file_actions)
 destroy spawn file actions object More...
 
int posix_spawn_file_actions_addclose (FAR posix_spawn_file_actions_t *file_actions, int fd)
 add close or open action to spawn file actions object More...
 
int posix_spawn_file_actions_adddup2 (FAR posix_spawn_file_actions_t *file_actions, int fd1, int fd2)
 add dup2 action to spawn file actions object More...
 
int posix_spawn_file_actions_addopen (FAR posix_spawn_file_actions_t *file_actions, int fd, FAR const char *path, int oflags, mode_t mode)
 add close or open action to spawn file actions object More...
 
int posix_spawnattr_init (FAR posix_spawnattr_t *attr)
 initialize spawn attributes object More...
 
int posix_spawnattr_getflags (FAR const posix_spawnattr_t *attr, FAR short *flags)
 get and set the spawn-flags attribute of a spawn attributes object More...
 
int posix_spawnattr_getschedparam (FAR const posix_spawnattr_t *attr, FAR struct sched_param *param)
 get the spawn-schedparam attribute of a spawn attributes object More...
 
int posix_spawnattr_getschedpolicy (FAR const posix_spawnattr_t *attr, FAR int *policy)
 get the spawn-schedpolicy attribute of a spawn attributes object More...
 
int posix_spawnattr_getsigmask (FAR const posix_spawnattr_t *attr, FAR sigset_t *sigmask)
 get the spawn-sigmask attribute of a spawn attributes object More...
 
int posix_spawnattr_setflags (FAR posix_spawnattr_t *attr, short flags)
 set the spawn-flags attribute of a spawn attributes object More...
 
int posix_spawnattr_setschedparam (FAR posix_spawnattr_t *attr, FAR const struct sched_param *param)
 set the spawn-schedparam attribute of a spawn attributes object More...
 
int posix_spawnattr_setschedpolicy (FAR posix_spawnattr_t *attr, int policy)
 set the spawn-schedpolicy attribute of a spawn attributes object More...
 
int posix_spawnattr_setsigmask (FAR posix_spawnattr_t *attr, FAR const sigset_t *sigmask)
 set the spawn-sigmask attribute of a spawn attributes object More...
 
int task_spawnattr_getstacksize (FAR const posix_spawnattr_t *attr, size_t *stacksize)
 The task_spawnattr_getstacksize() function will obtain the value of the spawn-stacksize attribute from the attributes object referenced by attr. More...
 
int task_spawnattr_setstacksize (FAR posix_spawnattr_t *attr, size_t stacksize)
 The task_spawnattr_setstacksize() function shall set the spawn- stacksize attribute in an initialized attributes object referenced by attr. More...
 
void posix_spawn_file_actions_dump (FAR posix_spawn_file_actions_t *file_actions)
 Show the entryent file actions. More...
 
void posix_spawnattr_dump (FAR posix_spawnattr_t *attr)
 Show the current attributes. More...
 
void add_file_action (FAR posix_spawn_file_actions_t *file_action, FAR struct spawn_general_file_action_s *entry)
 Add the file action to the end for the file action list. More...
 

Detailed Description

Provides APIs for Spawn.

Macro Definition Documentation

◆ CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE

#define CONFIG_TASK_SPAWN_DEFAULT_STACKSIZE   2048

Definition at line 84 of file spawn.h.

◆ POSIX_SPAWN_RESETIDS

#define POSIX_SPAWN_RESETIDS   (1 << 0) /* 1: Reset effective user ID */

Definition at line 91 of file spawn.h.

◆ POSIX_SPAWN_SETPGROUP

#define POSIX_SPAWN_SETPGROUP   (1 << 1) /* 1: Set process group */

Definition at line 92 of file spawn.h.

◆ POSIX_SPAWN_SETSCHEDPARAM

#define POSIX_SPAWN_SETSCHEDPARAM   (1 << 2) /* 1: Set task's priority */

Definition at line 93 of file spawn.h.

◆ POSIX_SPAWN_SETSCHEDULER

#define POSIX_SPAWN_SETSCHEDULER   (1 << 3) /* 1: Set task's scheduler policy */

Definition at line 94 of file spawn.h.

◆ POSIX_SPAWN_SETSIGDEF

#define POSIX_SPAWN_SETSIGDEF   (1 << 4) /* 1: Set default signal actions */

Definition at line 95 of file spawn.h.

◆ POSIX_SPAWN_SETSIGMASK

#define POSIX_SPAWN_SETSIGMASK   (1 << 5) /* 1: Set sigmask */

Definition at line 96 of file spawn.h.

◆ posix_spawnattr_destroy

#define posix_spawnattr_destroy (   attr)    (attr ? 0 : EINVAL)

Definition at line 232 of file spawn.h.

◆ posix_spawnattr_getpgroup

#define posix_spawnattr_getpgroup (   attr,
  group 
)    (ENOSYS)

Definition at line 245 of file spawn.h.

◆ posix_spawnattr_getsigdefault

#define posix_spawnattr_getsigdefault (   attr,
  sigdefault 
)    (ENOSYS)

Definition at line 260 of file spawn.h.

◆ posix_spawnattr_setpgroup

#define posix_spawnattr_setpgroup (   attr,
  group 
)    (ENOSYS)

Definition at line 281 of file spawn.h.

◆ posix_spawnattr_setsigdefault

#define posix_spawnattr_setsigdefault (   attr,
  sigdefault 
)    (ENOSYS)

Definition at line 296 of file spawn.h.

Typedef Documentation

◆ posix_spawn_file_actions_t

typedef FAR void* posix_spawn_file_actions_t

Definition at line 137 of file spawn.h.

◆ posix_spawnattr_t

Definition at line 127 of file spawn.h.

Enumeration Type Documentation

◆ spawn_file_actions_e

enum of spawn_file_action

Enumerator
SPAWN_FILE_ACTION_NONE 
SPAWN_FILE_ACTION_CLOSE 
SPAWN_FILE_ACTION_DUP2 
SPAWN_FILE_ACTION_OPEN 

Definition at line 80 of file spawn.h.

Function Documentation

◆ add_file_action()

void add_file_action ( FAR posix_spawn_file_actions_t file_action,
FAR struct spawn_general_file_action_s entry 
)

Add the file action to the end for the file action list.

#include <tinyara/spawn.h>

Parameters
[in]file_actionThe head of the file action list.
[in]entryThe file action to be added
Returns
none
Since
Tizen RT v1.0

◆ posix_spawn_file_actions_addclose()

int posix_spawn_file_actions_addclose ( FAR posix_spawn_file_actions_t file_actions,
int  fd 
)

add close or open action to spawn file actions object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawn_file_actions_adddup2()

int posix_spawn_file_actions_adddup2 ( FAR posix_spawn_file_actions_t file_actions,
int  fd1,
int  fd2 
)

add dup2 action to spawn file actions object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.1

◆ posix_spawn_file_actions_addopen()

int posix_spawn_file_actions_addopen ( FAR posix_spawn_file_actions_t file_actions,
int  fd,
FAR const char *  path,
int  oflags,
mode_t  mode 
)

add close or open action to spawn file actions object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawn_file_actions_destroy()

int posix_spawn_file_actions_destroy ( FAR posix_spawn_file_actions_t file_actions)

destroy spawn file actions object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawn_file_actions_dump()

void posix_spawn_file_actions_dump ( FAR posix_spawn_file_actions_t file_actions)

Show the entryent file actions.

#include <spawn.h>

Parameters
[in]file_actionsThe address of the file_actions to be dumped.
Since
Tizen RT v1.0

◆ posix_spawn_file_actions_init()

int posix_spawn_file_actions_init ( FAR posix_spawn_file_actions_t file_actions)

initialize spawn file actions object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawnattr_dump()

void posix_spawnattr_dump ( FAR posix_spawnattr_t attr)

Show the current attributes.

#include <spawn.h>

Parameters
[in]attrThe address of the spawn attributes to be dumped.
Since
Tizen RT v1.0

◆ posix_spawnattr_getflags()

int posix_spawnattr_getflags ( FAR const posix_spawnattr_t attr,
FAR short *  flags 
)

get and set the spawn-flags attribute of a spawn attributes object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawnattr_getschedparam()

int posix_spawnattr_getschedparam ( FAR const posix_spawnattr_t attr,
FAR struct sched_param param 
)

get the spawn-schedparam attribute of a spawn attributes object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawnattr_getschedpolicy()

int posix_spawnattr_getschedpolicy ( FAR const posix_spawnattr_t attr,
FAR int *  policy 
)

get the spawn-schedpolicy attribute of a spawn attributes object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawnattr_getsigmask()

int posix_spawnattr_getsigmask ( FAR const posix_spawnattr_t attr,
FAR sigset_t sigmask 
)

get the spawn-sigmask attribute of a spawn attributes object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawnattr_init()

int posix_spawnattr_init ( FAR posix_spawnattr_t attr)

initialize spawn attributes object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawnattr_setflags()

int posix_spawnattr_setflags ( FAR posix_spawnattr_t attr,
short  flags 
)

set the spawn-flags attribute of a spawn attributes object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawnattr_setschedparam()

int posix_spawnattr_setschedparam ( FAR posix_spawnattr_t attr,
FAR const struct sched_param param 
)

set the spawn-schedparam attribute of a spawn attributes object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawnattr_setschedpolicy()

int posix_spawnattr_setschedpolicy ( FAR posix_spawnattr_t attr,
int  policy 
)

set the spawn-schedpolicy attribute of a spawn attributes object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ posix_spawnattr_setsigmask()

int posix_spawnattr_setsigmask ( FAR posix_spawnattr_t attr,
FAR const sigset_t sigmask 
)

set the spawn-sigmask attribute of a spawn attributes object

#include <spawn.h>
POSIX API (refer to : http://pubs.opengroup.org/onlinepubs/9699919799/)

Since
Tizen RT v1.0

◆ task_spawnattr_getstacksize()

int task_spawnattr_getstacksize ( FAR const posix_spawnattr_t attr,
size_t *  stacksize 
)

The task_spawnattr_getstacksize() function will obtain the value of the spawn-stacksize attribute from the attributes object referenced by attr.

#include <spawn.h>

Parameters
[in]attrThe address spawn attributes to be queried.
[in]stacksizeThe location to return the spawn-stacksize value.
Returns
On success, these functions return 0; on failure they return an errno
Since
Tizen RT v1.0

◆ task_spawnattr_setstacksize()

int task_spawnattr_setstacksize ( FAR posix_spawnattr_t attr,
size_t  stacksize 
)

The task_spawnattr_setstacksize() function shall set the spawn- stacksize attribute in an initialized attributes object referenced by attr.

#include <spawn.h>

Parameters
[in]attrThe address spawn attributes to be used.
[in]stacksizeThe new stacksize to set.
Returns
On success, these functions return 0; on failure they return an errno
Since
Tizen RT v1.0