Changeset 2264 in kBuild
- Timestamp:
- Jan 23, 2009 12:31:38 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/misc/kmk_time.c
r2243 r2264 204 204 int rc; 205 205 #endif 206 int rcExit = 0; 206 207 207 208 /* … … 318 319 319 320 #else /* unix: */ 320 rc = 1;321 321 gettimeofday(&tvStart, NULL); 322 322 pid = fork(); … … 331 331 { 332 332 fprintf(stderr, "%s: error: fork() failed: %s\n", name(argv[0]), strerror(errno)); 333 return 8;333 return 9; 334 334 } 335 335 … … 360 360 (unsigned)tv.tv_usec); 361 361 if (WIFEXITED(rc)) 362 { 362 363 printf(" - normal exit: %d\n", WEXITSTATUS(rc)); 364 rc = WEXITSTATUS(rc); 365 } 363 366 else if (WIFSIGNALED(rc) && WCOREDUMP(rc)) 367 { 364 368 printf(" - dumped core: %s (%d)\n", my_strsignal(WTERMSIG(rc)), WTERMSIG(rc)); 369 rc = 10; 370 } 365 371 else if (WIFSIGNALED(rc)) 372 { 366 373 printf(" - killed by: %s (%d)\n", my_strsignal(WTERMSIG(rc)), WTERMSIG(rc)); 374 rc = 11; 375 } 367 376 else if (WIFSTOPPED(rc)) 377 { 368 378 printf(" - stopped by: %s (%d)\n", my_strsignal(WSTOPSIG(rc)), WSTOPSIG(rc)); 379 rc = 12; 380 } 369 381 else 382 { 370 383 printf(" unknown exit status %#x (%d)\n", rc, rc); 384 rc = 13; 385 } 371 386 #endif /* unix */ 387 if (rc && !rcExit) 388 rcExit = (int)rc; 372 389 373 390 /* calc min/max/avg */ … … 391 408 } 392 409 393 return rc ;410 return rcExit; 394 411 } 395 412
Note:
See TracChangeset
for help on using the changeset viewer.