diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-02-09 18:08:01 +0000 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2009-02-09 18:08:01 +0000 |
commit | c9cfc9a9f356386e07e6273f91dd3d46ca076c12 (patch) | |
tree | fd4f75d10b6b32715b6626e0af2c175d3b603401 /osdep-darwin.c | |
parent | 9d90d9ad705b9059e9bfa61b86cca7744cbca53d (diff) | |
download | rtmux-c9cfc9a9f356386e07e6273f91dd3d46ca076c12.tar.gz rtmux-c9cfc9a9f356386e07e6273f91dd3d46ca076c12.tar.bz2 rtmux-c9cfc9a9f356386e07e6273f91dd3d46ca076c12.zip |
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 :-/.
Diffstat (limited to 'osdep-darwin.c')
-rw-r--r-- | osdep-darwin.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/osdep-darwin.c b/osdep-darwin.c index 9ca0b3dd..441e5f57 100644 --- a/osdep-darwin.c +++ b/osdep-darwin.c @@ -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; |