Merge branch 'obsd-master'

This commit is contained in:
Thomas Adam
2024-05-15 14:01:09 +01:00
4 changed files with 43 additions and 21 deletions

18
tmux.c
View File

@ -235,6 +235,24 @@ fail:
return (NULL);
}
char *
shell_argv0(const char *shell, int is_login)
{
const char *slash, *name;
char *argv0;
slash = strrchr(shell, '/');
if (slash != NULL && slash[1] != '\0')
name = slash + 1;
else
name = shell;
if (is_login)
xasprintf(&argv0, "-%s", name);
else
xasprintf(&argv0, "%s", name);
return (argv0);
}
void
setblocking(int fd, int state)
{