diff options
author | Mike Fulbright <msf@redhat.com> | 2001-03-14 20:04:38 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2001-03-14 20:04:38 +0000 |
commit | 3bca4b6a9ccfed0f91daaeafe5a21e9fc4a328dd (patch) | |
tree | f84130c0bde0fee8a4ea20a176f23637796d6990 | |
parent | 6d90e68a62c22ab68ba25b4769546c579babbfe7 (diff) | |
download | anaconda-3bca4b6a9ccfed0f91daaeafe5a21e9fc4a328dd.tar.gz anaconda-3bca4b6a9ccfed0f91daaeafe5a21e9fc4a328dd.tar.xz anaconda-3bca4b6a9ccfed0f91daaeafe5a21e9fc4a328dd.zip |
avoid core dumps from reconfig mode when edd probe fails
-rw-r--r-- | edd/pyedd.c | 7 |
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); |