diff -up deltarpm-git-20090831.1/deltarpmmodule.c.foo deltarpm-git-20090831.1/deltarpmmodule.c
--- deltarpm-git-20090831.1/deltarpmmodule.c.foo 2009-09-09 13:28:37.000000000 -0400
+++ deltarpm-git-20090831.1/deltarpmmodule.c 2009-09-09 15:03:20.000000000 -0400
@@ -66,13 +66,17 @@ static PyObject *doRead(PyObject *s, PyO
int pid;
int ipcpipe[2];
- if (!PyArg_ParseTuple(args, "s", &filename))
+ if (!PyArg_ParseTuple(args, "s", &filename)) {
+ PyErr_SetFromErrno(PyExc_SystemError);
return NULL;
+ }
/* The delta rpm code does not expect to be used in its way. Its error handling
* conststs of 'printf' and 'exit'. So, dirty hacks abound. */
- if (pipe2(ipcpipe, O_NONBLOCK) == -1)
+ if (pipe2(ipcpipe, O_NONBLOCK) == -1) {
+ PyErr_SetFromErrno(PyExc_SystemError);
return NULL;
+ }
if ((pid = fork())) {
FILE *readend = fdopen(ipcpipe[0], "r");
@@ -90,7 +94,7 @@ static PyObject *doRead(PyObject *s, PyO
readdeltarpm(filename, &d, NULL);
PyMarshal_WriteObjectToFile(createDict(d), writend, Py_MARSHAL_VERSION);
- exit(0);
+ _exit(0);
}
return ret;
}