Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
b=5150
[fs/lustre-release.git]
/
lustre
/
tests
/
iopentest2.c
diff --git
a/lustre/tests/iopentest2.c
b/lustre/tests/iopentest2.c
index
6f95f95
..
046de92
100644
(file)
--- a/
lustre/tests/iopentest2.c
+++ b/
lustre/tests/iopentest2.c
@@
-12,6
+12,7
@@
#include <string.h>
#include <libgen.h>
#include <errno.h>
#include <string.h>
#include <libgen.h>
#include <errno.h>
+#include <sys/wait.h>
const char *progname;
const char usage_fmt[] = "Usage: %s <mountpoint>\n";
const char *progname;
const char usage_fmt[] = "Usage: %s <mountpoint>\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;
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]);
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);
break;
}
printf("%s: thread #%d (PID %d) started\n", argv[0], i, rc);
+ pidlist[i-1] = rc;
rc = 0;
}
rc = 0;
}
@@
-175,6
+178,9
@@
int main(int argc, char *argv[])
free(dir_iname);
}
free(dir_iname);
}
+ } else {
+ for ( i=0; i<10; i++)
+ waitpid(pidlist[i], NULL, 0);
}
return 0;
}
}
return 0;
}