commit 9c7fec74799adad5e38cb42dfb476c3b5d8cbd6e parent 559fd48d89aefdcda3d1828faa44b5f7d6629ad3 Author: qorg11 <qorg@vxempire.xyz> Date: Wed, 3 Jun 2020 03:30:25 +0200 Added kill Diffstat:
A | src/kill.c | | | 29 | +++++++++++++++++++++++++++++ |
1 file changed, 29 insertions(+), 0 deletions(-)
diff --git a/src/kill.c b/src/kill.c @@ -0,0 +1,29 @@ +#include <stdio.h> +#include <stdlib.h> +#include <signal.h> + +int +main(int argc, char *argv[]) +{ + int sig = 0; + pid_t pid; + + if(argc == 2) + { + sig = 15; + pid = atoi(argv[1]); + } + else if(argc == 3) + { + sig = abs(atoi(argv[1])); + pid = abs(atoi(argv[2])); + printf("Here 2\n"); + + + } + else + { + printf("Specify who to kill\n %i",argc); + } + kill(pid,sig); +}