mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-13 22:10:25 +01:00
Provide correct arguments to execvp
Previously no arguments were provided, but by convention argv[0] should be the name of the program. Providing this argumens enables Psuedoterminal node to work on macOS.
This commit is contained in:
parent
b2dc46636c
commit
570896b9c0
1 changed files with 5 additions and 3 deletions
|
@ -1,7 +1,8 @@
|
||||||
#include "pseudoterminal.h"
|
#include "pseudoterminal.h"
|
||||||
#include <unistd.h>
|
#include <libgen.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <termios.h>
|
#include <termios.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
// Platform specific includes.
|
// Platform specific includes.
|
||||||
#if defined(PLATFORM_LINUX)
|
#if defined(PLATFORM_LINUX)
|
||||||
|
@ -77,7 +78,8 @@ void Pseudoterminal::process_pty()
|
||||||
putenv(colortermenv);
|
putenv(colortermenv);
|
||||||
|
|
||||||
char *shell = getenv("SHELL");
|
char *shell = getenv("SHELL");
|
||||||
execvp(shell, NULL);
|
char *argv[] = { basename(shell), NULL };
|
||||||
|
execvp(shell, argv);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue