X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Ftests%2Fiopentest2.c;h=046de92b963de676890673be607294439fb96198;hb=7bb892f4f3de837a940d867b97fe14013ad67dc6;hp=6f95f955b6046dfa6ba39a3b674d875dae8ece31;hpb=66ed8c93cbcbb311f1e526e1abc40a372028e611;p=fs%2Flustre-release.git diff --git a/lustre/tests/iopentest2.c b/lustre/tests/iopentest2.c index 6f95f95..046de92 100644 --- a/lustre/tests/iopentest2.c +++ b/lustre/tests/iopentest2.c @@ -12,6 +12,7 @@ #include #include #include +#include const char *progname; const char usage_fmt[] = "Usage: %s \n"; @@ -66,6 +67,7 @@ int main(int argc, char *argv[]) char *fname_iname, *dir; char *dir_iname = NULL, *foo = NULL, *bar = NULL; int rc, fd, i, thread = 0; + int pidlist[10]; pname = strdup(argv[0]); progname = basename(argv[0]); @@ -86,6 +88,7 @@ int main(int argc, char *argv[]) break; } printf("%s: thread #%d (PID %d) started\n", argv[0], i, rc); + pidlist[i-1] = rc; rc = 0; } @@ -175,6 +178,9 @@ int main(int argc, char *argv[]) free(dir_iname); } + } else { + for ( i=0; i<10; i++) + waitpid(pidlist[i], NULL, 0); } return 0; }