Page MenuHomeFreeBSD

D44195.diff
No OneTemporary

D44195.diff

diff --git a/lib/libc/gen/posix_spawn.c b/lib/libc/gen/posix_spawn.c
--- a/lib/libc/gen/posix_spawn.c
+++ b/lib/libc/gen/posix_spawn.c
@@ -629,6 +629,10 @@
int
posix_spawnattr_setflags(posix_spawnattr_t *sa, short flags)
{
+ if ((flags & ~(POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP |
+ POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER |
+ POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK)) != 0)
+ return (EINVAL);
(*sa)->sa_flags = flags;
return (0);
}
diff --git a/lib/libc/gen/posix_spawnattr_getflags.3 b/lib/libc/gen/posix_spawnattr_getflags.3
--- a/lib/libc/gen/posix_spawnattr_getflags.3
+++ b/lib/libc/gen/posix_spawnattr_getflags.3
@@ -83,9 +83,12 @@
.Sh RETURN VALUES
The
.Fn posix_spawnattr_getflags
-and
+function returns zero.
+The
.Fn posix_spawnattr_setflags
-functions return zero.
+function returns zero on success, and
+.Er EINVAL
+on failure due to invalid flag specified.
.Sh SEE ALSO
.Xr posix_spawn 3 ,
.Xr posix_spawnattr_destroy 3 ,

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 10, 11:15 PM (16 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15747709
Default Alt Text
D44195.diff (987 B)

Event Timeline