[PATCH] Fix /proc pathname sizes on Solaris

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Mon Sep 17 14:11:00 GMT 2018


I'm slowly working my way through the gdb patches from the
solaris-userland repo

	https://github.com/oracle/solaris-userland/tree/master/components/gdb/patches

Some of them are pretty obvious and should be able to go in (such as
this one and the next), while others are either incomplete
(e.g. 008-syscalls.patch, which adds XML descriptions of the Solaris
syscalls, but lacks their registration) or inappropriate in their
current form (unnecessarily intrusive).

This one (001-fix-proc-name-size.patch) should be obvious given the
patches' comment:

# In Solaris, PID_MAX is 999999 (6 digit pid).
# In Solaris, lwpid_t is an unsigned int, so theoretically the lwp id
# could be 10 digits.

Two questions about procedure here:

* AFAIK Oracle has a corporate copyright assignment on file, so the
  patches should be covered.  Even if that were not the case, this one
  and the next are certainly below the 15-line limit for non-trivial
  patches.

* Given the code isn't mine, how should we handle attribution?  I
  suspect the engineer who committed the patch to github is the author,
  but don't know for certain.  Should I attribute it to her in the
  ChangeLog?

Tested on i386-pc-solaris2.11.  Ok for master?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2018-06-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	* procfs.c (MAX_PROC_NAME_SIZE): Allow for 6-digit PID_MAX and
	uint_t lwpid_t.
	(create_procinfo): Print pids in /proc without leading zeros.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: sol2-proc-pathname-size.patch
Type: text/x-patch
Size: 855 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20180917/538eadb1/attachment.bin>


More information about the Gdb-patches mailing list