k9core

Unnamed repository
Log | Files | Refs | LICENSE

commit 801cf9d5ae75a36105bb88468219eee9b7f04466
parent 3823f6299e919f2cbf1656bb6be792f67ea5929f
Author: qorg11 <qorg@vxempire.xyz>
Date:   Thu, 23 Jul 2020 05:40:58 +0200

Added unlink, not really sure of that this do but well here it is

Diffstat:
Asrc/unlink.c | 21+++++++++++++++++++++
1 file changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/unlink.c b/src/unlink.c @@ -0,0 +1,21 @@ +#include <stdio.h> +#include <unistd.h> +#include <errno.h> +#include <string.h> + +int +main(int argc, char *argv[]) +{ + if(argc == 1) + { + fprintf(stderr,"What do I unlink?\n"); + return 1; + } + int fd = unlink(argv[1]); + if(fd == -1) + { + printf("Error unlinking: %i = %s\n",errno,strerror(errno)); + } + return 0; + +}