From 64ef51a8ce6bc148ba493e350e2cac4cba470201 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Sat, 31 Oct 2020 17:45:29 +0000 Subject: some features: remake README.md for new code architecture; add help command; add man page; --- handerror.c | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 handerror.c (limited to 'handerror.c') diff --git a/handerror.c b/handerror.c deleted file mode 100644 index 35e8f28..0000000 --- a/handerror.c +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include -#include -#include - -void callError(int num) -{ - fprintf(stderr, "lpass: Sorry, there was an error in the program [#%d]\n", num); - exit(3); -} - -void printError(char *text) -{ - fprintf(stderr, "%s", text); - exit(4); -} - -void easyFork(char *name, char *arguments[]) -{ - int pid; - pid = fork(); - if(pid == -1) callError(100); - if(pid == 0) { /* new process */ - execvp(name, arguments); - perror(name); - exit(4); - } - wait(&pid); -} - -- cgit v1.2.3-18-g5258