YAZ_DOC
dnl
dnl
-AC_CHECK_HEADERS([dirent.h fnmatch.h wchar.h locale.h langinfo.h pwd.h unistd.h sys/select.h sys/socket.h sys/stat.h sys/time.h sys/times.h sys/types.h sys/un.h sys/wait.h netdb.h arpa/inet.h netinet/tcp.h netinet/in_systm.h],[],[],[])
+AC_CHECK_HEADERS([dirent.h fnmatch.h wchar.h locale.h langinfo.h pwd.h unistd.h sys/select.h sys/socket.h sys/stat.h sys/time.h sys/times.h sys/types.h sys/un.h sys/wait.h sys/prctl.h netdb.h arpa/inet.h netinet/tcp.h netinet/in_systm.h],[],[],[])
AC_CHECK_HEADERS([net/if.h netinet/in.h netinet/if_ether.h],[],[],[
#if HAVE_SYS_TYPES_H
#include <sys/types.h>
#include <pwd.h>
#endif
+#if HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#endif
+
#include <yaz/daemon.h>
#include <yaz/log.h>
#include <yaz/snprintf.h>
yaz_log(YLOG_FATAL|YLOG_ERRNO, "setuid");
exit(1);
}
+ /* Linux don't produce core dumps evern if the limit is right and
+ files are writable.. This fixes this. See prctl(2) */
+#if HAVE_SYS_PRCTL_H
+#ifdef PR_SET_DUMPABLE
+ prctl(PR_SET_DUMPABLE, 1, 0, 0);
+#endif
+#endif
}
if (flags & YAZ_DAEMON_FORK)