Re: libprocstat(3): retrieve process command line args and environment

2013-03-16 Thread Mikolaj Golub
On Wed, Feb 20, 2013 at 09:58:02PM +0200, Mikolaj Golub wrote: > On Wed, Feb 20, 2013 at 09:04:14AM -0500, John Baldwin wrote: > > > The process should be stopped by the time we dump a core, so running it > > multiple times should be ok in that the sizes should not change. I would > > say that yo

Re: libprocstat(3): retrieve process command line args and environment

2013-03-16 Thread Mikolaj Golub
On Sat, Mar 16, 2013 at 09:16:05PM +0200, Konstantin Belousov wrote: > IMO sbuf_pad() should be moved to subr_sbuf.c. I find the KPI of > the sbuf_pad() wrong. You have two separate number, the amount to > pad to, and the current amount. Natural interface would take the > two numbers separate inst

Re: libprocstat(3): retrieve process command line args and environment

2013-03-16 Thread Mikolaj Golub
On Sun, Mar 17, 2013 at 12:35:20AM +0200, Mikolaj Golub wrote: > Ah, this is a thing I wanted to discuss but forgot! As I understand > the idea of the 'ABI hack' is: if the output buffer is less than the > size of data we have, truncate our data to the last successfully > written kinfo_file struct

Re: libprocstat(3): retrieve process command line args and environment

2013-03-16 Thread Konstantin Belousov
On Sun, Mar 17, 2013 at 12:35:20AM +0200, Mikolaj Golub wrote: > On Sat, Mar 16, 2013 at 09:16:05PM +0200, Konstantin Belousov wrote: > > > IMO sbuf_pad() should be moved to subr_sbuf.c. I find the KPI of > > the sbuf_pad() wrong. You have two separate number, the amount to > > pad to, and the cur