Skip to content

Instantly share code, notes, and snippets.

@lorin
Last active July 7, 2016 01:27
Show Gist options
  • Save lorin/1e81340db0dd3012d5e3 to your computer and use it in GitHub Desktop.
Save lorin/1e81340db0dd3012d5e3 to your computer and use it in GitHub Desktop.
Output maximum path length of unix domain socket
#include <sys/un.h>
#include <stdio.h>
int main()
{
struct sockaddr_un s;
printf("%lu\n", sizeof(s.sun_path));
return 0;
}
@lorin
Copy link
Author

lorin commented Nov 2, 2014

On Linux, this is 108. On Mac OS X, it's 104.

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