Issue #10044 has been reported by Hailin Hu. ---------------------------------------- Bug #10044: socket.write has different behaviors in process and thread https://bugs.ruby-lang.org/issues/10044 * Author: Hailin Hu * Status: Open * Priority: Normal * Assignee: * Category: * Target version: * ruby -v: ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN ---------------------------------------- It's a use case that sending message to syslog through unix socket. My env is Amazon Linux 2013.09. Run the script attached and check /var/log/message, you will see: The result of socket.write in a thread is cut around 4KB, which seems like common PAGESIZE or something like that. The other 3 cases are OK with the 5KB message. According to "man 2 send", it is said "With zero flags argument, send() is equivalent to write(2)". I'm not sure if it is the right reference. Is it an issue of ruby? ---Files-------------------------------- send_n_write.rb (502 Bytes) -- https://bugs.ruby-lang.org/