[patch] port-irix.c: refine jlimit support
Ayamura KIKUCHI
ayamura at ayamura.org
Tue May 27 03:19:42 EST 2003
--- openbsd-compat/port-irix.c.orig 2002-04-07 03:58:33.000000000 +0900
+++ openbsd-compat/port-irix.c 2003-05-27 02:11:07.620000380 +0900
@@ -7,6 +7,12 @@
#endif /* WITH_IRIX_PROJECT */
#ifdef WITH_IRIX_JOBS
#include <sys/resource.h>
+#include <optional_sym.h>
+# if !defined(JLIMIT_CPU)
+typedef __int64_t jid_t;
+extern jid_t jlimit_startjob(char *, uid_t, char *);
+# pragma optional jlimit_startjob
+# endif
#endif
#ifdef WITH_IRIX_AUDIT
#include <sat.h>
@@ -27,10 +33,15 @@
#endif /* WITH_IRIX_JOBS */
#ifdef WITH_IRIX_JOBS
- jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive");
- if (jid == -1)
- fatal("Failed to create job container: %.100s",
- strerror(errno));
+ if (_MIPS_SYMBOL_PRESENT(jlimit_startjob)) {
+ jid = jlimit_startjob(pw->pw_name, pw->pw_uid, "interactive");
+ if (jid == -1) {
+ if (errno == ENOPKG)
+ jid = 0;
+ else
+ fatal("Failed to create job container: %.100s", strerror(errno));
+ }
+ }
#endif /* WITH_IRIX_JOBS */
#ifdef WITH_IRIX_ARRAY
/* initialize array session */
-- ayamura
More information about the openssh-unix-dev
mailing list