commit 5b0d9b7cea555e89ed6ceee0860ddf4369b92fd5
parent 786a3e1ae3bc6aa2490dd2e08905641468b6804e
Author: Louis Burda <quent.burda@gmail.com>
Date: Tue, 14 Mar 2023 01:51:33 +0100
Add MIT license
Diffstat:
3 files changed, 24 insertions(+), 8 deletions(-)
diff --git a/LICENSE b/LICENSE
@@ -0,0 +1,21 @@
+MIT License
+
+Copyright (c) 2023 Louis Burda
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/Makefile b/Makefile
@@ -1,14 +1,14 @@
PREFIX ?= /usr/local
BINDIR ?= /bin
+CFLAGS = -Wunused-variable -Wunused-function
+
all: vkill
clean:
rm -f vkill
-vkill: vkill.c
-
-install: vkill
+install:
install -m755 vkill -T "$(DESTDIR)$(PREFIX)$(BINDIR)/vkill"
uninstall:
diff --git a/vkill.c b/vkill.c
@@ -11,11 +11,6 @@
#include <stdlib.h>
#include <stdio.h>
-static const char *strcasestr(const char *haystack, const char *needle);
-
-static char *readcmd(pid_t pid);
-static void killprompt(pid_t pid);
-
static const char usage[] = "vkill [-h] [-SIG] CMD";
static int signum = SIGTERM;