Sorry, my patch caused compile error. I didn't make sure the availability on
other OS X version (my env is 10.8.x).
I replaced proc_bsdshortinfo by proc_bsdinfo, which exists on 10.5 and later.
https://gist.github.com/ichizok/5289677/raw/da84bc2bcc0578b2df0222c01f831c0fd50d1b45/osdep-datwin.c.pat
My patch replaces sysctl with proc_pidinfo. This is the same way as
osdep_get_cwd.
On 2013/02/11, at 21:04, Nicholas Marriott wrote:
> Ok but what does your patch do and how does it fix the problem?
>
>
> On Mon, Feb 11, 2013 at 08:56:06PM +0900, OZAKI Kiichi wrote
On OS X, osdep_get_name calls sysctl by the pid of the session leader process.
But sysctl returns 0 even though process is gone, so osdep_get_name returns
uninitialized value.
For example, command `ps | less` (ps -- session leader -- quits before less)
causes status-line disarray sometimes.
(tmu