* PATCH: configure-time setting of MAXJOB
@ 2000-04-13 18:54 Clint Adams
2000-04-13 22:24 ` Clint Adams
0 siblings, 1 reply; 2+ messages in thread
From: Clint Adams @ 2000-04-13 18:54 UTC (permalink / raw)
To: zsh-workers
This (if you have linux/tasks.h) will make hitting the process table limit
more likely than filling up the job table. I'm not committing this.
Index: acconfig.h
===================================================================
RCS file: /cvsroot/zsh/zsh/acconfig.h,v
retrieving revision 1.2
diff -u -r1.2 acconfig.h
--- acconfig.h 2000/04/07 02:27:44 1.2
+++ acconfig.h 2000/04/13 18:38:24
@@ -139,6 +139,10 @@
/* Define to be a string corresponding the vendor of the machine */
#undef VENDOR
+/* Define to limit job table size */
+#undef MAXJOB
+#undef NEED_LINUX_TASKS_H
+
/* Define if your system defines `struct winsize' in sys/ptem.h. */
#undef WINSIZE_IN_PTEM
Index: configure.in
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.in,v
retrieving revision 1.3
diff -u -r1.3 configure.in
--- configure.in 2000/04/07 02:27:44 1.3
+++ configure.in 2000/04/13 18:38:24
@@ -443,7 +443,8 @@
termios.h sys/param.h sys/filio.h string.h memory.h \
limits.h fcntl.h libc.h sys/utsname.h sys/resource.h \
locale.h errno.h stdlib.h unistd.h sys/capability.h \
- utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h)
+ utmp.h utmpx.h sys/types.h pwd.h grp.h poll.h sys/mman.h \
+ linux/tasks.h)
if test $dynamic = yes; then
AC_CHECK_HEADERS(dlfcn.h)
AC_CHECK_HEADERS(dl.h)
@@ -496,6 +497,27 @@
fi
AC_CHECK_HEADER([sys/ptem.h], AC_DEFINE(WINSIZE_IN_PTEM))
+
+dnl Try to get a sane value for MAXJOB
+linux_tasks_defines_mtpu=no
+AC_MSG_CHECKING(what to set MAXJOB to)
+if test $ac_cv_header_linux_tasks_h = yes; then
+AC_EGREP_CPP(yes,
+[#include <linux/tasks.h>
+ #ifdef MAX_TASKS_PER_USER
+ yes
+ #endif
+], linux_tasks_defines_mtpu=yes)
+fi
+
+if test $linux_tasks_defines_mtpu = yes; then
+AC_DEFINE(MAXJOB, MAX_TASKS_PER_USER)
+AC_DEFINE(NEED_LINUX_TASKS_H)
+AC_MSG_RESULT(${msg}MAX_TASKS_PER_USER)
+else
+AC_DEFINE(MAXJOB, 50)
+AC_MSG_RESULT(${msg}50)
+fi
dnl -------------------
dnl CHECK FOR LIBRARIES
Index: Src/zsh.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/zsh.h,v
retrieving revision 1.4
diff -u -r1.4 zsh.h
--- Src/zsh.h 2000/04/12 13:06:18 1.4
+++ Src/zsh.h 2000/04/13 18:38:25
@@ -661,8 +661,9 @@
/* Defintions for job table and job control */
/********************************************/
-/* size of job table */
-#define MAXJOB 50
+#ifdef NEED_LINUX_TASKS_H
+#include <linux/tasks.h>
+#endif
/* entry in the job table */
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-04-13 22:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-04-13 18:54 PATCH: configure-time setting of MAXJOB Clint Adams
2000-04-13 22:24 ` Clint Adams
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).