Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

WeirdBob
Copy link
Contributor

On linux, at package init, call IPC_INFO and retrieve msgmax (the configured size of a message)
Use this size to create the buffers to send and receive messages
Since we can't create a packed structure with a slice, use binary.Read/Write to mashall the data into a []byte for syscall

Since IPC_INFO may not be supported on all OSes, it's restricted to linux in this PR, and the default 8192 bytes value is kept on the other systems (or if the call fails)

@siadat siadat merged commit ade3c50 into siadat:master Jul 12, 2020
@siadat
Copy link
Owner

siadat commented Jul 12, 2020

This looks good to me, thank you @WeirdBob 👌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants