my-pkgs/acpilight/xbacklight.c

19 lines
283 B
C

#include <unistd.h>
#include <stdlib.h>
int main (int argc, char** argv)
{
int i;
char** args;
args = malloc((argc+1)*sizeof(char*));
for(i = 0; i < argc; ++i) {
args[i] = argv[i];
}
args[argc] = NULL;
execv("/opt/xbacklight", args);
free(args);
return 0;
}