This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Privilege(s) needed to run top command

On Mar 11 21:41, Achim Gratz wrote:
> jwang writes:
> > This is used to work for a ordinary login.
> >
> > After re-install, top does not show the true load et al.  Nor processes
> > owned by SYSTEM.
> >
> > Please shed some light.
> Cygwin is a user-space layer.  It can't show you information that the
> underlying OS determines to be off-limits for you.

And I just checked, even under Cygwin 2.11.2, procps and top were
not showing foreign processes if you're running under a non-admin
user account or a non-elevated shell, so this is nothing new.

In fact, `procps' at least tries to access /proc/<PID>/stat.  This
doesn't return valid information because it has to be able to open a
permissions.  No ordinary user has these permissions on processes she
doesn't own.(*)

However, Cygwin's `ps -e' was supposed to show all processes, but
it didn't anymore since I created helper objects in the NT namespace
with insufficient privileges for everyone.  I pushed a patch and
uploaded new developer snapshots to
for testing.


(*) That doesn't mean it's not possible.  In theory all Cygwin
    processes could be opened to allow everyone
    PROCESS_QUERY_LIMITED_INFORMATION access, which would at least
    fill most of /proc/<PID>/stat for foreign processes.
    However, we never did that, so it can't have worked yet.

Corinna Vinschen
Cygwin Maintainer

Attachment: signature.asc
Description: PGP signature

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]