From 8370ecfb22fcdb3f0a9b76b5fdb0b7000725ebdc Mon Sep 17 00:00:00 2001 From: _ov4 Date: Tue, 11 Aug 2026 10:25:46 +0000 Subject: 1 --- shlab-handout/myint.c | 36 ------------------------------------ 1 file changed, 36 deletions(-) delete mode 100644 shlab-handout/myint.c (limited to 'shlab-handout/myint.c') diff --git a/shlab-handout/myint.c b/shlab-handout/myint.c deleted file mode 100644 index ea5bee1..0000000 --- a/shlab-handout/myint.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * myint.c - Another handy routine for testing your tiny shell - * - * usage: myint - * Sleeps for seconds and sends SIGINT to itself. - * - */ -#include -#include -#include -#include -#include -#include - -int main(int argc, char **argv) -{ - int i, secs; - pid_t pid; - - if (argc != 2) { - fprintf(stderr, "Usage: %s \n", argv[0]); - exit(0); - } - secs = atoi(argv[1]); - - for (i=0; i < secs; i++) - sleep(1); - - pid = getpid(); - - if (kill(pid, SIGINT) < 0) - fprintf(stderr, "kill (int) error"); - - exit(0); - -} -- cgit v1.3.1-4-g156e