1 // RUN: %clang %s -o %t && %run %t 2>&1 | FileCheck %s
3 // Older versions of Android do not have certain posix_spawn* functions.
4 // UNSUPPORTED: android
11 int main(int argc
, char **argv
) {
19 posix_spawnattr_t attr
= {0};
20 posix_spawn_file_actions_t file_actions
= {0};
22 char *const args
[] = {
23 argv
[0], "2", "3", "4", "2", "3", "4", "2", "3", "4",
24 "2", "3", "4", "2", "3", "4", "2", "3", "4", NULL
,
27 "A=B", "A=B", "A=B", "A=B", "A=B", "A=B", "A=B", "A=B", "A=B", "A=B",
28 "A=B", "A=B", "A=B", "A=B", "A=B", "A=B", "A=B", "A=B", "A=B", NULL
,
32 int s
= posix_spawn(&pid
, argv
[0], &file_actions
, &attr
, args
, env
);
35 waitpid(pid
, &s
, WUNTRACED
| WCONTINUED
);
37 s
= posix_spawnp(&pid
, argv
[0], &file_actions
, &attr
, args
, env
);
40 waitpid(pid
, &s
, WUNTRACED
| WCONTINUED
);