Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide per-process getresuid() and getresgid() methods #137

Closed
giampaolo opened this issue May 23, 2014 · 5 comments
Closed

Provide per-process getresuid() and getresgid() methods #137

giampaolo opened this issue May 23, 2014 · 5 comments

Comments

@giampaolo
Copy link
Owner

From g.rodola on November 22, 2010 13:29:10

This should reflect os.getresuid() [1] and os.getresgid() [2] Python functions 
but in a per-process fashion, and return a named tuple as such:

>>> p = psutil.Process(os.getpid)
>>> p.getresuid()
user(real=1000, effective=1000, saved=1000)
>>> p.getresgid()
group(real=1000, effective=1000, saved=1000)

This should be provided for UNIX systems only and raise AttributeError on Windows.

Not sure what to do with current "uid" and "gid" properties.
It probably makes sense to deprecate them.


[1] http://docs.python.org/library/os.html#os.getresuid [2] 
http://docs.python.org/library/os.html#os.getresgid

Original issue: http://code.google.com/p/psutil/issues/detail?id=137

@giampaolo giampaolo self-assigned this May 23, 2014
@giampaolo
Copy link
Owner Author

From g.rodola on November 22, 2010 05:53:35

Implemented on Linux in r835 .
I decided to provide this as "uids" and "gids" properties as they're easier to 
type/remember than "getresuid" and "getresgid".

Labels: Progress-1in4

@giampaolo
Copy link
Owner Author

From g.rodola on November 22, 2010 06:45:43

Implemented for FreeBSD in r837 .
Re-assigning to Jay for missing OSX implementation.

Owner: jloden
Labels: -Progress-1in4 Progress-2in4

@giampaolo
Copy link
Owner Author

From g.rodola on February 16, 2011 18:55:06

Implemented on OSX in r916 .

Status: FixedInSVN
Labels: -Progress-2in4

@giampaolo
Copy link
Owner Author

From g.rodola on March 20, 2011 14:55:37

Status: Fixed

@giampaolo
Copy link
Owner Author

From g.rodola on March 02, 2013 03:57:13

Updated csets after the SVN -> Mercurial migration: r835 == revision 
28262c50be27 r837 == revision b5d7376dafd1 r916 == revision 5780f675d6e3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant