mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
slave: prefix argv[0] with a '-' when spawning a login-shell
This commit is contained in:
parent
6af4b87ec5
commit
b5efe984bb
7 changed files with 44 additions and 13 deletions
5
server.c
5
server.c
|
|
@ -213,6 +213,9 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
|
|||
goto shutdown;
|
||||
}
|
||||
|
||||
CHECK_BUF(sizeof(uint8_t));
|
||||
const uint8_t login_shell = *(const uint8_t *)p; p += sizeof(login_shell);
|
||||
|
||||
CHECK_BUF(sizeof(argc));
|
||||
argc = *(int *)p; p += sizeof(argc);
|
||||
argv = calloc(argc + 1, sizeof(argv[0]));
|
||||
|
|
@ -238,7 +241,7 @@ fdm_client(struct fdm *fdm, int fd, int events, void *data)
|
|||
|
||||
client->term = term_init(
|
||||
server->conf, server->fdm, server->wayl,
|
||||
strlen(term_env) > 0 ? term_env : server->conf->term,
|
||||
strlen(term_env) > 0 ? term_env : server->conf->term, login_shell,
|
||||
"footclient", cwd, argc, argv, &term_shutdown_handler, client);
|
||||
|
||||
if (client->term == NULL) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue