Im trying to use execve() with set variables, but i tried using getenv() and setting HOME at the start and it never works
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
int main( ){
char *args[] = { "ls",NULL};//, "-l", "/", NULL};
char *environ[] = { getenv("PATH") , NULL };
printf("Listing directory:\n");
int ret = execve(args[0], args, environ);
printf("shouldnt be here = %d\n",ret);
puts(getenv("PATH"));
return EXIT_FAILURE;
}