ruby-changes:56207
From: Nobuyoshi <ko1@a...>
Date: Sun, 23 Jun 2019 23:17:27 +0900 (JST)
Subject: [ruby-changes:56207] Nobuyoshi Nakada: 97a7f463f6 (trunk): Max length of UNIX socket path is 104 bytes on macOS
https://git.ruby-lang.org/ruby.git/commit/?id=97a7f463f6 From 97a7f463f683774f054f9d7dafc3756aad39dd1c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 23 Jun 2019 23:12:47 +0900 Subject: Max length of UNIX socket path is 104 bytes on macOS diff --git a/spec/ruby/library/socket/fixtures/classes.rb b/spec/ruby/library/socket/fixtures/classes.rb index ebed668..4a59050 100644 --- a/spec/ruby/library/socket/fixtures/classes.rb +++ b/spec/ruby/library/socket/fixtures/classes.rb @@ -34,9 +34,9 @@ module SocketSpecs https://github.com/ruby/ruby/blob/trunk/spec/ruby/library/socket/fixtures/classes.rb#L34 def self.socket_path path = tmp("unix.sock", false) - # Check for too long unix socket path (max 108 bytes including \0 => 107) + # Check for too long unix socket path (max 104 bytes on macOS) # Note that Linux accepts not null-terminated paths but the man page advises against it. - if path.bytesize > 107 + if path.bytesize > 104 path = "/tmp/unix_server_spec.socket" end rm_socket(path) -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/