mirror of
https://github.com/sshuttle/sshuttle.git
synced 2025-08-09 23:57:36 +02:00
ui-macos: call the main binary MacOS/Sshuttle.
That way we can 'killall Sshuttle' and so on, and it looks right in the process list.
This commit is contained in:
@ -7,8 +7,17 @@
|
||||
* goes wrong if your interpreter is /usr/bin/python.
|
||||
*/
|
||||
#include <Python.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
return Py_Main(argc, argv);
|
||||
}
|
||||
char *path = strdup(argv[0]), *cptr;
|
||||
char *args[] = {argv[0], "../Resources/main.py", NULL};
|
||||
cptr = strrchr(path, '/');
|
||||
if (cptr)
|
||||
*cptr = 0;
|
||||
chdir(path);
|
||||
free(path);
|
||||
return Py_Main(2, args);
|
||||
}
|
||||
|
Reference in New Issue
Block a user