Alright. Here is the patch as git patch. Hope that works. I left out the "flags" variable from the shm_open() call that you showed, since I didn't see it being used or declared anywhere.
The commit message is lengthy, but I tried to explain what's going on, so
others don't have to go digging for the same problem in the future.
I did test it, and it works "as advertised". I noticed that the 4.0 code
base of Squid does a much better job of cleaning up after itself than 3.5
did. With 3.5, I could trigger the problem by starting Squid in the
foreground ("squid -N") and then hitting Ctrl-C twice (the second time
would interrupt the cleanup process). With the 4.0 code base, I had to use
"kill -9" to get it to leave the shared memory segments behind. My other
attempts at triggering the problem failed, because it continued to clean up
properly, despite being sent multiple signals.
The improved cleanup is good news. It means the EEXIST condition won't be
hit nearly as much as it would otherwise.
Regards,
-Markus
0001-Fix-Ipc-Mem-Segment-create-for-OS-X.patch
Description: Binary data
_______________________________________________ squid-dev mailing list [email protected] http://lists.squid-cache.org/listinfo/squid-dev
