sync with OpenBSD -current
This commit is contained in:
parent
65428aad14
commit
57ecf9bd1d
2058 changed files with 272997 additions and 201906 deletions
|
@ -1,4 +1,4 @@
|
|||
/* $OpenBSD: tmux.c,v 1.211 2023/04/17 18:00:19 nicm Exp $ */
|
||||
/* $OpenBSD: tmux.c,v 1.212 2024/05/15 09:59:12 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
|
||||
|
@ -239,6 +239,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)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue