Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: third_party/psutil/psutil/_psutil_common.c

Issue 8919026: Remove psutil from tree, install via install-build-deps.sh (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Sort package list. Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « third_party/psutil/psutil/_psutil_common.h ('k') | third_party/psutil/psutil/_psutil_linux.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * $Id: _psutil_common.c 1142 2011-10-05 18:45:49Z g.rodola $
3 *
4 * Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved.
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
7 *
8 * Routines common to all platforms.
9 */
10
11 #include <Python.h>
12
13
14 /*
15 * Set OSError(errno=ESRCH, strerror="No such process") Python exception.
16 */
17 PyObject *
18 NoSuchProcess(void) {
19 PyObject *exc;
20 char *msg = strerror(ESRCH);
21 exc = PyObject_CallFunction(PyExc_OSError, "(is)", ESRCH, msg);
22 PyErr_SetObject(PyExc_OSError, exc);
23 Py_XDECREF(exc);
24 return NULL;
25 }
26
27 /*
28 * Set OSError(errno=EACCES, strerror="Permission denied") Python exception.
29 */
30 PyObject *
31 AccessDenied(void) {
32 PyObject *exc;
33 char *msg = strerror(EACCES);
34 exc = PyObject_CallFunction(PyExc_OSError, "(is)", EACCES, msg);
35 PyErr_SetObject(PyExc_OSError, exc);
36 Py_XDECREF(exc);
37 return NULL;
38 }
39
OLDNEW
« no previous file with comments | « third_party/psutil/psutil/_psutil_common.h ('k') | third_party/psutil/psutil/_psutil_linux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698