k9core

Unnamed repository
Log | Files | Refs | LICENSE

commit 0f8f9dc3636f486a03d090629432273bcce4e646
parent fecba9abf1a7eb5458665a1f2a7ebb0b55fbc005
Author: qorg11 <qorg@vxempire.xyz>
Date:   Sun,  2 Aug 2020 18:01:58 +0200

exec

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

diff --git a/src/exec.c b/src/exec.c @@ -0,0 +1,15 @@ +#include <unistd.h> +#include <stdio.h> + +int +main(int argc, char *argv[]) +{ + if(argc == 1) + { + fprintf(stderr,"what do you want to do?\n"); + return 1; + } + char *const argv2[1] = {argv[2]}; + execv(argv[1],argv2); + return 0; +}