mirror of
https://github.com/tmux/tmux.git
synced 2025-04-22 20:38:48 +00:00
Fixup osdep-* specific code
get_proc_name() is osdep_get_name() outside of OpenBSD.
This commit is contained in:
parent
1a0951959f
commit
f703a30dfe
4
client.c
4
client.c
@ -349,10 +349,6 @@ client_send_identify(int flags)
|
|||||||
fd = open("/", O_RDONLY);
|
fd = open("/", O_RDONLY);
|
||||||
client_write_one(MSG_IDENTIFY_CWD, fd, NULL, 0);
|
client_write_one(MSG_IDENTIFY_CWD, fd, NULL, 0);
|
||||||
|
|
||||||
#ifdef __CYGWIN__
|
|
||||||
snprintf(&data.ttyname, sizeof data.ttyname, "%s",
|
|
||||||
ttyname(STDIN_FILENO));
|
|
||||||
#else
|
|
||||||
if ((fd = dup(STDIN_FILENO)) == -1)
|
if ((fd = dup(STDIN_FILENO)) == -1)
|
||||||
fatal("dup failed");
|
fatal("dup failed");
|
||||||
client_write_one(MSG_IDENTIFY_STDIN, fd, NULL, 0);
|
client_write_one(MSG_IDENTIFY_STDIN, fd, NULL, 0);
|
||||||
|
@ -24,7 +24,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <vis.h>
|
|
||||||
|
|
||||||
#include "tmux.h"
|
#include "tmux.h"
|
||||||
|
|
||||||
|
2
format.c
2
format.c
@ -355,7 +355,7 @@ format_get_command(struct window_pane *wp)
|
|||||||
{
|
{
|
||||||
char *cmd, *out;
|
char *cmd, *out;
|
||||||
|
|
||||||
cmd = get_proc_name(wp->fd, wp->tty);
|
cmd = osdep_get_name(wp->fd, wp->tty);
|
||||||
if (cmd == NULL || *cmd == '\0') {
|
if (cmd == NULL || *cmd == '\0') {
|
||||||
free(cmd);
|
free(cmd);
|
||||||
cmd = xstrdup(wp->cmd);
|
cmd = xstrdup(wp->cmd);
|
||||||
|
Loading…
Reference in New Issue
Block a user