By Hans-Christian Egtvedt (hans-christian.egtvedt AT atmel.com):
strace.c: suppress "warning: unused static" message by adding #ifdef's around
a variable
.gitignore: trivial
test/*.c: cleanup (suppress warnings, much better style).
diff --git a/test/vfork.c b/test/vfork.c
index 2c2d603..367dc01 100644
--- a/test/vfork.c
+++ b/test/vfork.c
@@ -1,10 +1,14 @@
-main()
+#include <stdlib.h>
+#include <unistd.h>
+
+int main(int argc, char *argv[])
{
- if (vfork() == 0)
+ if (vfork() == 0) {
write(1, "child\n", 6);
- else {
+ } else {
wait(0);
write(1, "parent\n", 7);
}
+
exit(0);
}