summaryrefslogtreecommitdiff
path: root/usrbin/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'usrbin/main.c')
-rw-r--r--usrbin/main.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/usrbin/main.c b/usrbin/main.c
index 68f1a5c..31d38c1 100644
--- a/usrbin/main.c
+++ b/usrbin/main.c
@@ -4,21 +4,17 @@
#include <time.h>
#include <unistd.h>
-void sighandler(int sig) {
- printf("Caught SIGALRM!\n");
-}
-
void pid1(void) {
- printf("We did it ma!\n");
+ ssize_t in;
+ char buf[2] = { 0, 0 };
- signal(SIGALRM, &sighandler);
- alarm(2);
- pause();
- printf("Alarm expired!\n");
- pause();
+ printf("We did it ma!\n");
- while(1)
- printf("It's didn't work!\n");
+ while(1) {
+ in = read(buf, 1);
+ if(in > 0)
+ puts(buf);
+ }
}
void pid2(void) {