aboutsummaryrefslogtreecommitdiffstats
path: root/src/handerror.c
diff options
context:
space:
mode:
authorJoursoir <chat@joursoir.net>2021-02-26 13:36:16 +0000
committerJoursoir <chat@joursoir.net>2021-02-26 13:36:16 +0000
commita8fe7bce0ea33f71485cf8c2e4c8330831c849ce (patch)
tree6d4edaf2142c43b188b91203998d154e45804565 /src/handerror.c
parente6f8a3570b63724091c4cec78db609ad65963d65 (diff)
downloadlock-password-a8fe7bce0ea33f71485cf8c2e4c8330831c849ce.tar.gz
lock-password-a8fe7bce0ea33f71485cf8c2e4c8330831c849ce.tar.bz2
lock-password-a8fe7bce0ea33f71485cf8c2e4c8330831c849ce.zip
rename handerror to xstd; create and use some routines
Diffstat (limited to 'src/handerror.c')
-rw-r--r--src/handerror.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/handerror.c b/src/handerror.c
deleted file mode 100644
index 218619d..0000000
--- a/src/handerror.c
+++ /dev/null
@@ -1,30 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <sys/wait.h>
-
-void callError(int num)
-{
- fprintf(stderr, "lpass: Sorry, there was an error in the program [#%d]\n", num);
- exit(3);
-}
-
-void printError(const 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);
-}
-