chrismiles / psi (http://pypi.python.org/pypi/PSI)

PSI is a Python package providing real-time access to processes and other miscellaneous system information such as architecture, boottime and filesystems. It has a pythonic API which is consistent accross all supported platforms but also exposes platform-specific details where desirable.

Clone this repository (size: 915.4 KB): HTTPS / SSH
$ hg clone http://bitbucket.org/chrismiles/psi/
commit 493: e49d29dacc55
parent 492: 28903f6dd8ba
branch: default
Fix refrence counting leak This did not result in a memory leak since we just kept increasing the refrence count of True or False but it's still a bug.
Floris Bruynooghe / flub
3 months ago

Changed (Δ52 bytes):

raw changeset »

src/process.c (2 lines added, 0 lines removed)

Up to file-list src/process.c:

@@ -743,9 +743,11 @@ Process_children(PsiProcessObject *self)
743
743
    PyErr_WarnEx(PyExc_FutureWarning, "Experimental method", 1);
744
744
    isalive = Process_exists(self);
745
745
    if (isalive != Py_True) {
746
        Py_DECREF(isalive);
746
747
        PyErr_SetString(PsiExc_NoSuchProcessError, "Process no longer exists");
747
748
        return NULL;
748
749
    }
750
    Py_DECREF(isalive);
749
751
    children = PyList_New(0);
750
752
    if (children == NULL)
751
753
        return NULL;