ALT Linux Bugzilla
– Attachment 8661 Details for
Bug 38212
[mipsel] posix_spawn with POSIX_SPAWN_RESETIDS does not work
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
Reproducer
spawn.c (text/x-csrc), 771 bytes, created by
Ivan A. Melnikov
on 2020-03-12 15:22:09 MSK
(
hide
)
Description:
Reproducer
Filename:
MIME Type:
Creator:
Ivan A. Melnikov
Created:
2020-03-12 15:22:09 MSK
Size:
771 bytes
patch
obsolete
> >#include <stdlib.h> >#include <stdio.h> >#include <string.h> > >#include <unistd.h> >#include <spawn.h> >#include <sys/wait.h> > >extern char **environ; > > >int main(void) { > char *argv[] = {"/bin/true", NULL}; > int status; > pid_t pid; > posix_spawnattr_t attr; > > > posix_spawnattr_init(&attr); > posix_spawnattr_setflags(&attr, POSIX_SPAWN_RESETIDS); > > status = posix_spawn(&pid, "/bin/true", > NULL, &attr, argv, environ); > if (status == 0) { > if (waitpid(pid, &status, 0) != -1) { > printf("Child exited with status %i\n", status); > } else { > perror("waitpid"); > } > } else { > printf("posix_spawn: %s\n", strerror(status)); > } > posix_spawnattr_destroy(&attr); > return 1; >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 38212
: 8661