From 97a7f463f683774f054f9d7dafc3756aad39dd1c Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada Date: Sun, 23 Jun 2019 23:12:47 +0900 Subject: Max length of UNIX socket path is 104 bytes on macOS --- spec/ruby/library/socket/fixtures/classes.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec') diff --git a/spec/ruby/library/socket/fixtures/classes.rb b/spec/ruby/library/socket/fixtures/classes.rb index ebed66851d..4a590502ca 100644 --- a/spec/ruby/library/socket/fixtures/classes.rb +++ b/spec/ruby/library/socket/fixtures/classes.rb @@ -34,9 +34,9 @@ module SocketSpecs 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 v1.2.3