From 24437cd554995f729969299e72699e2ba5d9b068 Mon Sep 17 00:00:00 2001 From: kaashoek Date: Fri, 11 Aug 2006 18:18:38 +0000 Subject: fix deadlock---iput(dp) asap working unlink, but doesn't free dir blocks that become empty remove out-of-date comment in ioapic --- userfs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'userfs.c') diff --git a/userfs.c b/userfs.c index af87561..8c6121b 100644 --- a/userfs.c +++ b/userfs.c @@ -5,7 +5,7 @@ // file system tests -char buf[2000]; +char buf[3000]; char *echo_args[] = { "echo", "hello", "goodbye", 0 }; char *cat_args[] = { "cat", "README", 0 }; @@ -62,13 +62,14 @@ main(void) } else { printf(stdout, "error: open doesnotexist failed!\n"); } - i = read(fd, buf, 10000); + i = read(fd, buf, 2000); if (i == 2000) { - printf(stdout, "read succeeded\\n"); + printf(stdout, "read succeeded\n"); } else { printf(stdout, "read failed\n"); } close(fd); + unlink("doesnotexist"); //exec("echo", echo_args); printf(stdout, "about to do exec\n"); exec("cat", cat_args); -- cgit v1.2.3