summaryrefslogtreecommitdiffstats
path: root/edd
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-03-14 20:04:38 +0000
committerMike Fulbright <msf@redhat.com>2001-03-14 20:04:38 +0000
commit3bca4b6a9ccfed0f91daaeafe5a21e9fc4a328dd (patch)
treef84130c0bde0fee8a4ea20a176f23637796d6990 /edd
parent6d90e68a62c22ab68ba25b4769546c579babbfe7 (diff)
downloadanaconda-3bca4b6a9ccfed0f91daaeafe5a21e9fc4a328dd.tar.gz
anaconda-3bca4b6a9ccfed0f91daaeafe5a21e9fc4a328dd.tar.xz
anaconda-3bca4b6a9ccfed0f91daaeafe5a21e9fc4a328dd.zip
avoid core dumps from reconfig mode when edd probe fails
Diffstat (limited to 'edd')
-rw-r--r--edd/pyedd.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/edd/pyedd.c b/edd/pyedd.c
index 01492a9ac..75aa98854 100644
--- a/edd/pyedd.c
+++ b/edd/pyedd.c
@@ -18,6 +18,7 @@
#include "edd.h"
#include <sys/wait.h>
+#include <sys/resource.h>
#include <unistd.h>
#include <Python.h>
@@ -43,6 +44,12 @@ edd_py_detect (PyObject * s, PyObject * args) {
The child returns 1 if edd works, and 0 if it doesn't. */
if (!(childpid = fork())) {
+ /* lets not drop core file if we do segv */
+ struct rlimit lims;
+
+ lims.rlim_cur = 0;
+ setrlimit(RLIMIT_CORE, &lims);
+
if ((ec = edd_supported(device))) {
free (ec);
_exit(1);