site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com On May 31, 2006, at 21:44 , Michelle Munson wrote: By setting the socket options SO_REUSEADDR and SO_REUSEPORT, I've been able to successfully get two instances of the same process running as the same user to bind and share the same UDP port on OS X. However, if the two instances of the process are running as different user ids, the bind attempt by the second instance of the process fails with "address already in use". Does anyone know if there is way to get two instances of the same process running as different user ids to reuse the same UDP port on Mac OS X? Regards, Justin -- Justin C. Walker, Curmudgeon at Large Institute for the Absorption of Federal Funds ----------- I'm beginning to like the cut of his jibberish. ----------- _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... As I understand this issue, it is not possible. The options you mention are provided to permit the "same service" to restart without having to worry about stray packets for *that* service coming in after the service instance that would receive those packets has terminated (a long sentence; forgive me). Mac OS X/Darwin (and most BSD-derived systems that I'm aware of) treat the port space as a system-wide resource, and the port is used (with the destination IP address) to demux incoming UDP or TCP frames. Thus, you can't share ports across different "services". Note also the implicit assumption that there really is at most one recipient, at any point in time, for a UDP packet addressed to a given (IP/port) pair. This email sent to site_archiver@lists.apple.com