Alien-uv
view release on metacpan or search on metacpan
libuv/test/run-tests.c view on Meta::CPAN
do
r = write(3, out, sizeof(out) - 1);
while (r == -1 && errno == EINTR);
fsync(3);
#endif
}
return 1;
}
if (strcmp(argv[1], "spawn_helper6") == 0) {
int r;
notify_parent_process();
r = fprintf(stdout, "hello world\n");
ASSERT(r > 0);
r = fprintf(stderr, "hello errworld\n");
ASSERT(r > 0);
return 1;
}
if (strcmp(argv[1], "spawn_helper7") == 0) {
int r;
char *test;
notify_parent_process();
/* Test if the test value from the parent is still set */
test = getenv("ENV_TEST");
ASSERT(test != NULL);
r = fprintf(stdout, "%s", test);
ASSERT(r > 0);
return 1;
}
#ifndef _WIN32
if (strcmp(argv[1], "spawn_helper8") == 0) {
int fd;
notify_parent_process();
ASSERT(sizeof(fd) == read(0, &fd, sizeof(fd)));
ASSERT(fd > 2);
ASSERT(-1 == write(fd, "x", 1));
return 1;
}
#endif /* !_WIN32 */
if (strcmp(argv[1], "spawn_helper9") == 0) {
notify_parent_process();
spawn_stdin_stdout();
return 1;
}
#ifndef _WIN32
if (strcmp(argv[1], "spawn_helper_setuid_setgid") == 0) {
uv_uid_t uid = atoi(argv[2]);
uv_gid_t gid = atoi(argv[3]);
ASSERT(uid == getuid());
ASSERT(gid == getgid());
notify_parent_process();
return 1;
}
#endif /* !_WIN32 */
return run_test(argv[1], 0, 1);
}
( run in 0.950 second using v1.01-cache-2.11-cpan-97f6503c9c8 )