2 changed files with 0 additions and 32 deletions
@ -1,29 +0,0 @@
|
||||
|
||||
#include <stdio.h> |
||||
#include <stdlib.h> |
||||
#include <string.h> |
||||
#include <unistd.h> |
||||
#include <errno.h> |
||||
|
||||
#define NAME "node11" |
||||
|
||||
#define WRAP PREFIX "/bin/" NAME |
||||
#define REAL PREFIX "/libexec/" NAME "/node" |
||||
|
||||
int main(int argn, char **argv) |
||||
{ |
||||
char *path; |
||||
|
||||
argv[0] = REAL; |
||||
if ((path = getenv("NODE")) != NULL) |
||||
if (strcmp(path, NAME) != 0 && strcmp(path, WRAP) != 0) |
||||
argv[0] = path; |
||||
|
||||
if (execvp(argv[0], argv) == -1) { |
||||
fprintf(stderr, "node: ERROR: failed to execute \"%s\": %s\n", argv[0], strerror(errno)); |
||||
exit(1); |
||||
} |
||||
|
||||
return 0; |
||||
} |
||||
|
Loading…
Reference in new issue