On Wed, Sep 12, 2001 at 11:25:28AM +0800, Trent Nelson wrote:
> On Sun, Sep 09, 2001 at 11:23:34AM -0500, [EMAIL PROTECTED] wrote:
>     What do you get when you run the attached program as root?

>         kd = kvm_openfiles(NULL, NULL, NULL, O_RDONLY, errbuf);
>         kd2 = kvm_open(NULL, NULL, NULL, O_RDONLY,
>                         "kvm_open failed");

Both of these calls completed successfully when executed as root, as does
my own code.  This code also has the same behavior on -CURRENT as 4.1.1-STABLE.
I'm not sure what I was observing last week.

Interestingly, I discovered that by replacing NULL as an argument to
kvm_open with "/dev/null" (a prompt I took from top in -CURRENT) this
code works for users other than root.  I don't understand what the difference
in semantics between using /dev/null as a exec/core/swap file and using
a NULL pointer is, but the former seems to work.

Chris Wicklein <[EMAIL PROTECTED]>

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to