mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Don't try to change the window name unless the pid of the process chosen has
changed. Reduces CPU use. osdep-* stuff is a bit horrible now but there we go :-/.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
/* $Id: osdep-darwin.c,v 1.4 2009-02-07 19:41:35 nicm Exp $ */
|
||||
/* $Id: osdep-darwin.c,v 1.5 2009-02-09 18:08:01 nicm Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2009 Joshua Elsasser <josh@elsasser.org>
|
||||
@ -25,7 +25,9 @@
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
char *get_argv0(int, char *);
|
||||
int osdep_get_name(int, char *, pid_t *, char **);
|
||||
|
||||
#define unused __attribute__ ((unused))
|
||||
|
||||
/*
|
||||
* XXX This actually returns the executable path, not the process's argv[0].
|
||||
@ -33,8 +35,8 @@ char *get_argv0(int, char *);
|
||||
* Apple's 'ps' source and start digging.
|
||||
*/
|
||||
|
||||
char *
|
||||
get_argv0(int fd, __attribute__ ((unused)) char *tty)
|
||||
int
|
||||
osdep_get_name(int fd, unused char *tty, unused pid_t *last_pid, char **name)
|
||||
{
|
||||
int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PID, 0 };
|
||||
size_t size;
|
||||
|
Reference in New Issue
Block a user