Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
need help creating install package for SIMPL open source project
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="bobicanprogram" data-source="post: 1204532" data-attributes="member: 195399"><p><strong>shmat problems</strong></p><p></p><p>It would seem that I was a little premature in discussing packaging the SIMPL toolkit for the Mac. While everything appears to compile fine there is a problem with the shared memory IPC which underlies the SIMPL messaging.</p><p></p><p>In a SIMPL transaction the sender creates the shared memory segment and loads it with the outgoing message. This sender then packages up the shmid and pumps it down a fifo (used for synchronization) to the receiver. The receiver reads this shmid from the other end of the fifo and then attaches to the shared memory segment and reads the message contents.</p><p></p><p>I'm getting reports that the receiver attach is failing with the "Invalid argument" error from the shmat() call. There are only 3 args for shmat. In my case that call is set as:</p><p></p><p>*sender = shmat(fifoMsg->shmid, 0, 0);</p><p></p><p>I've verified that the shmid is the same value as was generated by the shmget() call in the sender.</p><p></p><p>Any ideas why this code which works fine on Linux would be broken on Mac OSX?</p><p></p><p>bob</p><p>PS.</p><p>The shared memory size is 1k ... which presumably rounds up to one page so we shouldn't be tripping on MacOSX default limits to shared memory.</p></blockquote><p></p>
[QUOTE="bobicanprogram, post: 1204532, member: 195399"] [b]shmat problems[/b] It would seem that I was a little premature in discussing packaging the SIMPL toolkit for the Mac. While everything appears to compile fine there is a problem with the shared memory IPC which underlies the SIMPL messaging. In a SIMPL transaction the sender creates the shared memory segment and loads it with the outgoing message. This sender then packages up the shmid and pumps it down a fifo (used for synchronization) to the receiver. The receiver reads this shmid from the other end of the fifo and then attaches to the shared memory segment and reads the message contents. I'm getting reports that the receiver attach is failing with the "Invalid argument" error from the shmat() call. There are only 3 args for shmat. In my case that call is set as: *sender = shmat(fifoMsg->shmid, 0, 0); I've verified that the shmid is the same value as was generated by the shmget() call in the sender. Any ideas why this code which works fine on Linux would be broken on Mac OSX? bob PS. The shared memory size is 1k ... which presumably rounds up to one page so we shouldn't be tripping on MacOSX default limits to shared memory. [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
need help creating install package for SIMPL open source project
Top