Irix joblimits failure (was: Re: New snapshot)
David Kaelbling
drk at sgi.com
Sun Apr 7 04:40:32 EST 2002
Ben Lindstrom wrote:
>
> Am I going to see the fix for IRIX that you promised? Or am I going to
> have to do a code revert before 3.2 release?
Sorry, I've been busy trying to ship our own release the last couple
weeks. I should be able to work on this again after the 10th. If the
freeze for 3.2 is coming up please pull my changes. I can re-submit
them when they are more robust.
Sorry,
David
> On Thu, 7 Mar 2002, David Kaelbling wrote:
>
> > IRIX has a compatibility mechanism that lets you test for optional symbols (like jlimit_start) at run-time. I think these patches will let all all IRIX 6.5 systems build images that will test for job limit support dynamically:
> >
> > --- ./configure.ac Wed Feb 27 01:12:35 2002
> > +++ ../openssh-3.1p1/./configure.ac Thu Mar 7 15:50:21 2002
> > @@ -115,7 +115,7 @@
> > AC_DEFINE(WITH_IRIX_ARRAY)
> > AC_DEFINE(WITH_IRIX_PROJECT)
> > AC_DEFINE(WITH_IRIX_AUDIT)
> > - AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS)])
> > + AC_DEFINE(WITH_IRIX_JOBS)
> > AC_DEFINE(BROKEN_INET_NTOA)
> > ;;
> > *-*-linux*)
> >
> >
> > --- ./openbsd-compat/port-irix.c Tue Feb 19 15:02:49 2002
> > +++ ../openssh-3.1p1/./openbsd-compat/port-irix.c Thu Mar 7 15:35:21 2002
> > @@ -3,13 +3,20 @@
> > #if defined(WITH_IRIX_PROJECT) || defined(WITH_IRIX_JOBS) || defined(WITH_IRIX_ARRAY)
> >
> > #ifdef WITH_IRIX_PROJECT
> > -#include <proj.h>
> > +# include <proj.h>
> > #endif /* WITH_IRIX_PROJECT */
> > #ifdef WITH_IRIX_JOBS
> > -#include <sys/resource.h>
> > -#endif
> > +# include <sys/resource.h>
> > +# include <optional_sym.h>
> > +# if !defined(JLIMIT_CPU)
> > +/* Simulate job limit support so we can still test for it at runtime. */
> > +typedef __int64_t jid_t;
> > +extern jid_t jlimit_startjob(char *, uid_t, char *);
> > +# pragma optional jlimit_startjob
> > +# endif
> > +#endif /* WITH_IRIX_JOBS */
> > #ifdef WITH_IRIX_AUDIT
> > -#include <sat.h>
> > +# include <sat.h>
> > #endif /* WITH_IRIX_AUDIT */
> >
> > void
> > @@ -27,10 +34,16 @@
> > #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",
> > + 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 */
> >
> > (Hopefully that didn't get line-wrapped. If it did I can try again.)
> > The JLIMIT_CPU test is to try and recognize when we are compiling on a system without the job limit headers.
> >
> > Thanks,
> > David
> >
> > --
> > David KAELBLING <drk at sgi.com> Silicon Graphics Computer Systems
> > 1 Cabot Rd, suite 250; Hudson, MA 01749 781.839.2157, fax ...2357
> > _______________________________________________
> > openssh-unix-dev at mindrot.org mailing list
> > http://www.mindrot.org/mailman/listinfo/openssh-unix-dev
> >
--
David KAELBLING <drk at sgi.com> Silicon Graphics Computer Systems
1 Cabot Rd, suite 250; Hudson, MA 01749 781.839.2157, fax ...2357
More information about the openssh-unix-dev
mailing list