#define _XOPEN_SOURCE 600 #include #include #include #include int main(int argc, char *argv[]) { if (argc > 0) { char *newname = strdup("@TCLSH@"); if (newname != NULL) { argv[0] = newname; } /* Ignore errors and just leave argv[0] the same, hoping that the * executed program will still work fine. */ } execvp("@TCLSH@", argv); perror("execvp('@TCLSH@', argv)"); return EXIT_FAILURE; }