Closed djberg96 closed 3 years ago
I'm just not seeing the environment information in the buffer. Maybe there's been an API change?
Below is the buffer from a Process.spawn({'A' => 'B', 'Z' => nil}, "sleep 60")
call. I don't see it present in the buffer. It should be somewhere between the "\x0060" and the "\xFF\xBF".
"/bin/sleep\x00\x00\x00\x00\x00\x00sleep\x0060\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xFF\xBF\x00\x 00\x00\x00/bin/sleep\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00"
I see the same error on my Big Sur machine.
Strangely if you grab other processes they do have the information - I only see it missing from ones spawned as children.
@Fryguy I could only find a single reference to what we're seeing:
https://forums.freebsd.org/threads/port-freebsd-sysctl-library-to-mac.77486/
This could just be a fundamental change in Big Sur. Maybe for security reasons? Or a bug?
Yes that looks very relevant.
Yep, I think it's a change in the OS. I'll have to update the test and add a comment.
My solution for now - skip it: https://github.com/djberg96/sys-proctable/pull/90
I noticed a test failure after upgrading to Big Sur.
Ruby 3.0.1 Big Sur Darwin Daniels-iMac.local 20.6.0 Darwin Kernel Version 20.6.0: Wed Jun 23 00:26:31 PDT 2021; root:xnu-7195.141.2~5/RELEASE_X86_64 x86_64