Hi!

Sorry, I lost access to my GNU/kFreeBSD system so could not test my
latest changes against s-s-d up to recently.

On Wed, 2014-01-08 at 15:16:35 +0300, Hleb Valoshka wrote:
> On 1/7/14, Guillem Jover <guil...@debian.org> wrote:
> > I think adding OSDragonflyBSD to previous preprocessor block for the
> > other BSD should be enough, the next one catching HAVE_KVM_H should
> > include the remaning header files.
> 
> It's a problematic because dfly disallows including sys/proc.h from userspace.

Ok, it should now be easier, as usability of these files is now detected
at configure time.

> >> +#elif defined (OSDragonflyBSD)
> >> +#define PROCESS_NAME_SIZE MAXCOMLEN
> >>  #endif
> >
> > Just to know what's the portably safe minimum for callers to use, to
> > what does MAXCOMLEN expand?
> 
> 16. But I think it's better to use system defined macro then "magic"
> constant. FreeBSD has MAXCOMLEN too.

Sure, just wanted to know the limit to see if it was lower than any of
the already supported limits.

> > I've got a patch to switch the FreeBSD code to use the KVM method,
> > unfortunately it seems to use ki_ namespaced struct members.
> >
> > Also the KVM method seems to be missing a proper do_procinit(), which
> > could be something like the following untested code, I had lying
> > around:

> > For DragonFly BSD, you'll need to change ki_pid to kp_pid I guess. If
> > this works on DragonFly BSD, I'll commit that before applying your patch.
> 
> It works, but with some more dfly specific tweaks (it uses
> KERN_PROC_ALL where other OSes uses KERN_PROC_PROC, and its kernel
> PIDs are less than 1).

> I'll send refreshed dfly patch after you apply patch for do_procinit.

It is now in master and in 1.17.7. BTW I think your kvm_read() for
kp->kp_ruid is unnecessary, as that should have been filled already by
the libkvm library, only stuff stored away via a pointer should need
retrieving with kvm_read().

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to