tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Testing mksh as bootstrap shell



* On 2020-06-25 at 09:53 BST, Jonathan Perkin wrote:

> FWIW this is on macOS, not Solaris.  On Solaris mksh appears to do the
> right thing, supporting -v but not -m which matches the native shells.
> However on macOS both -m and -v are supported by native shells, but
> only -v by mksh.

The "fix" is:

  --- a/shells/mksh/files/funcs.c
  +++ b/shells/mksh/files/funcs.c
  @@ -3240,9 +3240,6 @@ ptest_error(Test_env *te, int ofs, const char *msg)
   #else
   #define ULIMIT_M_IS_RSS
   #endif
  -#if defined(ULIMIT_M_IS_RSS) && defined(RLIMIT_AS) && (RLIMIT_RSS == RLIMIT_AS)
  -#undef ULIMIT_M_IS_RSS
  -#endif
   #endif
   
   #if !defined(RLIMIT_AS) && !defined(ULIMIT_M_IS_VMEM) && defined(RLIMIT_VMEM)

i.e. just because macOS has "#define RLIMIT_RSS RLIMIT_AS" in its
sys/resource.h for compatibility, don't remove -m support.

-- 
Jonathan Perkin  -  Joyent, Inc.  -  www.joyent.com


Home | Main Index | Thread Index | Old Index