more x86_64 work. started to put the mmu bits together in the (former) stage2 loader.
[newos.git] / apps / kill / main.c
blob21d329ab4cae21578622722753fe6f797897c282
1 /*
2 ** Copyright 2004, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 #include <stdlib.h>
6 #include <stdio.h>
7 #include <signal.h>
9 static void usage(int argc, char **argv)
11 printf("invalid args, usage: %s <process id>\n", argv[1]);
13 exit(-1);
16 int main(int argc, char **argv)
18 proc_id pid;
20 if(argc < 2) {
21 usage(argc, argv);
24 pid = atoi(argv[1]);
26 printf("sending TERM signal to process %d\n", pid);
28 kill(pid, SIGTERM);
30 return 0;