summaryrefslogtreecommitdiff
path: root/stressfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'stressfs.c')
-rw-r--r--stressfs.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/stressfs.c b/stressfs.c
index 43f312b..5d4fee2 100644
--- a/stressfs.c
+++ b/stressfs.c
@@ -14,20 +14,19 @@
int
main(int argc, char *argv[])
{
- int i;
+ int fd, i;
+ char path[] = "stressfs0";
+
printf(1, "stressfs starting\n");
- for(i = 0; i < 4; i++){
- if(fork() > 0){
+ for(i = 0; i < 4; i++)
+ if(fork() > 0)
break;
- }
- }
printf(1, "%d\n", i);
- char path[] = "stressfs0";
path[8] += i;
- int fd = open(path, O_CREATE | O_RDWR);
+ fd = open(path, O_CREATE | O_RDWR);
for(i = 0; i < 100; i++)
printf(fd, "%d\n", i);
close(fd);