| 211 | } |
| 212 | |
| 213 | static int test8(int argc, char const* argv[]) |
| 214 | { |
| 215 | /* Create a disowned grandchild to test handling of processes |
| 216 | that exit before their children. */ |
| 217 | int r; |
| 218 | char const* cmd[4]; |
| 219 | (void)argc; |
| 220 | cmd[0] = argv[0]; |
| 221 | cmd[1] = "run"; |
| 222 | cmd[2] = "108"; |
| 223 | cmd[3] = 0; |
| 224 | fprintf(stdout, "Output on stdout before grandchild test.\n"); |
| 225 | fprintf(stderr, "Output on stderr before grandchild test.\n"); |
| 226 | fflush(stdout); |
| 227 | fflush(stderr); |
| 228 | r = runChild(cmd, kwsysProcess_State_Disowned, kwsysProcess_Exception_None, |
| 229 | 1, 1, 1, 0, 10, 0, 1, 1, 0, 0); |
| 230 | fprintf(stdout, "Output on stdout after grandchild test.\n"); |
| 231 | fprintf(stderr, "Output on stderr after grandchild test.\n"); |
| 232 | fflush(stdout); |
| 233 | fflush(stderr); |
| 234 | return r; |
| 235 | } |
| 236 | |
| 237 | static int test8_grandchild(int argc, char const* argv[]) |
| 238 | { |