Re: ps buffer is incorrectly padded on the (latest) OS X

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alexey Klyukin <alexk(at)commandprompt(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: ps buffer is incorrectly padded on the (latest) OS X
Date: 2010-09-04 19:41:18
Message-ID: 2758.1283629278@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I wrote:
> I tried this on a PPC Mac running 10.4.11, which is the oldest Mac OS
> I have handy at the moment. It worked fine. The existing coding in
> ps_status.c dates from late 2001, which means that it was first tested
> against OS X 10.1, and most likely we have not rechecked the question
> of what PS_PADDING value to use since then. My guess is that Apple
> must have changed this in OS X 10.2 or 10.3, because the userland
> Unix utilities were pretty well settled after that.

Just for the archives' sake: I dug through the OS X source code archives
and confirmed that this behavior changed at 10.3: compare getproclline
in 10.2.8
http://www.opensource.apple.com/source/adv_cmds/adv_cmds-46/ps.tproj/print.c
vs 10.3
http://www.opensource.apple.com/source/adv_cmds/adv_cmds-63/ps.tproj/print.c

So we don't need a version check unless you're worried about somebody
trying to run Postgres 9.x on OS X 10.2 (which was retired in 2003).

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-09-05 02:54:24 Re: lexing small ints as int2
Previous Message Tom Lane 2010-09-04 18:16:21 Re: 9.1alpha1 bundled -- please verify