diff options
Diffstat (limited to 'stressfs.c')
-rw-r--r-- | stressfs.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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); |