mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-04 07:09:47 +00:00
LibC: Add POSIX_SPAWN_SETSIGMASK
This isn't in posix yet, but it is implemented on some platforms and it will be in a future version: https://www.austingroupbugs.net/view.php?id=1044 It seems useful, so add it.
This commit is contained in:
parent
39d1a43c45
commit
2ddca326be
Notes:
sideshowbarker
2024-07-19 05:32:24 +09:00
Author: https://github.com/nico
Commit: 2ddca326be
Pull-request: https://github.com/SerenityOS/serenity/pull/2593
2 changed files with 11 additions and 1 deletions
|
@ -95,6 +95,12 @@ extern "C" {
|
|||
exit(127);
|
||||
}
|
||||
}
|
||||
if (flags & POSIX_SPAWN_SETSID) {
|
||||
if (setsid() < 0) {
|
||||
perror("posix_spawn setsid");
|
||||
exit(127);
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: POSIX_SPAWN_SETSCHEDULER
|
||||
}
|
||||
|
@ -232,7 +238,7 @@ int posix_spawnattr_init(posix_spawnattr_t* attr)
|
|||
|
||||
int posix_spawnattr_setflags(posix_spawnattr_t* attr, short flags)
|
||||
{
|
||||
if (flags & ~(POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP | POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER | POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK))
|
||||
if (flags & ~(POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP | POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER | POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK | POSIX_SPAWN_SETSID))
|
||||
return EINVAL;
|
||||
|
||||
attr->flags = flags;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue