aboutsummaryrefslogtreecommitdiff
path: root/shlab-handout/myspin.c
diff options
context:
space:
mode:
Diffstat (limited to 'shlab-handout/myspin.c')
-rw-r--r--shlab-handout/myspin.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/shlab-handout/myspin.c b/shlab-handout/myspin.c
deleted file mode 100644
index 08c3e0c..0000000
--- a/shlab-handout/myspin.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/*
- * myspin.c - A handy program for testing your tiny shell
- *
- * usage: myspin <n>
- * Sleeps for <n> seconds in 1-second chunks.
- *
- */
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-int main(int argc, char **argv)
-{
- int i, secs;
-
- if (argc != 2) {
- fprintf(stderr, "Usage: %s <n>\n", argv[0]);
- exit(0);
- }
- secs = atoi(argv[1]);
- for (i=0; i < secs; i++)
- sleep(1);
- exit(0);
-}