sched/task: Remove spawn_proxyattrs as obsolete implementation
Like the name implies, it is supposed to set the spawn attributes for the NuttX specific "spawn proxy task" which was historically used as a proxy to spawn new tasks. The proxy handled file actions and the signal mask which are inherited from the parent. The proxy task does not exist anymore, thus the proxy task attributes do not need to be set anymore either. Also, the function is currently still used, but the signal mask is set for the spawning process, not the proxy process, and this is most DEFINITELY an error (as the spawning process's signal mask changes unexpectedly). Setting the signal mask for the newly spawned process is simple, just set it directly, if instructed to do so. This will be done in a later patch!
This commit is contained in:
parent
43be20d67e
commit
6e9e215943
@ -58,19 +58,4 @@
|
||||
|
||||
int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr);
|
||||
|
||||
/****************************************************************************
|
||||
* Name: spawn_proxyattrs
|
||||
*
|
||||
* Description:
|
||||
* Set attributes of the proxy task before it has started the new child
|
||||
* task.
|
||||
*
|
||||
* Input Parameters:
|
||||
*
|
||||
* attr - The attributes to use
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void spawn_proxyattrs(FAR const posix_spawnattr_t *attr);
|
||||
|
||||
#endif /* __SCHED_TASK_SPAWN_H */
|
||||
|
@ -221,11 +221,6 @@ int posix_spawn(FAR pid_t *pid, FAR const char *path,
|
||||
sinfo("pid=%p path=%s file_actions=%p attr=%p argv=%p\n",
|
||||
pid, path, file_actions, attr, argv);
|
||||
|
||||
if (attr != NULL)
|
||||
{
|
||||
spawn_proxyattrs(attr);
|
||||
}
|
||||
|
||||
return nxposix_spawn_exec(pid, path,
|
||||
file_actions != NULL ?
|
||||
*file_actions : NULL, attr, argv, envp);
|
||||
|
@ -331,11 +331,6 @@ int task_spawn(FAR const char *name, main_t entry,
|
||||
sinfo("name=%s entry=%p file_actions=%p attr=%p argv=%p\n",
|
||||
name, entry, file_actions, attr, argv);
|
||||
|
||||
if (attr != NULL)
|
||||
{
|
||||
spawn_proxyattrs(attr);
|
||||
}
|
||||
|
||||
ret = nxtask_spawn_exec(&pid, name, entry,
|
||||
file_actions != NULL ? *file_actions : NULL,
|
||||
attr, argv, envp);
|
||||
|
@ -227,29 +227,6 @@ int spawn_execattrs(pid_t pid, FAR const posix_spawnattr_t *attr)
|
||||
return OK;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: spawn_proxyattrs
|
||||
*
|
||||
* Description:
|
||||
* Set attributes of the proxy task before it has started the new child
|
||||
* task.
|
||||
*
|
||||
* Input Parameters:
|
||||
*
|
||||
* attr - The attributes to use
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
void spawn_proxyattrs(FAR const posix_spawnattr_t *attr)
|
||||
{
|
||||
/* Check if we need to change the signal mask */
|
||||
|
||||
if (attr != NULL && (attr->flags & POSIX_SPAWN_SETSIGMASK) != 0)
|
||||
{
|
||||
nxsig_procmask(SIG_SETMASK, &attr->sigmask, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
* Name: spawn_file_actions
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user