From: brad@bradlanders.com
To: ruby-core@ruby-lang.org
Subject: [ruby-core:95515] [Ruby master Bug#16277] UNIXServer#listen fails with Errno::EADDRINUSE error under Windows 10 / WSL Ubuntu 18.04
Date: Wed, 23 Oct 2019 20:20:27 +0000 (UTC) [thread overview]
Message-ID: <redmine.issue-16277.20191023202026.fe684fa229d91396@ruby-lang.org> (raw)
In-Reply-To: redmine.issue-16277.20191023202026@ruby-lang.org
Issue #16277 has been reported by bradland (Brad Landers).
----------------------------------------
Bug #16277: UNIXServer#listen fails with Errno::EADDRINUSE error under Windows 10 / WSL Ubuntu 18.04
https://bugs.ruby-lang.org/issues/16277
* Author: bradland (Brad Landers)
* Status: Open
* Priority: Normal
* Assignee:
* Target version:
* ruby -v: ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux-gnu]
* Backport: 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
When running the following script under Windows 10 / WSL Ubuntu 18.04, an Errno::EADDRINUSE error is thrown. Expected result is that the script would run and simply exit.
``` ruby
#!/usr/bin/env ruby
# This script establishes a UNIX server socket.
#
# Expected result: Script should run and immediately exit.
#
# Actual result: Script fails with Errno::EADDRINUSE error.
#
# Environment: Windows 10 Pro, WSL, Ubuntu 18.04.2, ruby 2.6.5p114 (2019-10-01 revision 67812) [x86_64-linux-gnu]
#
# To reproduce: Create a tmp folder, copy this script there, and execute.
require 'socket'
path = File.expand_path('listen.sock')
backlog = 5
s = UNIXServer.new(path)
if backlog
s.listen backlog
else
s.listen
end
File.delete(path) if File.exists?(path)
```
The bug was discoverd as part of Puma (gem) issue #1521: https://github.com/puma/puma/issues/1521.
--
https://bugs.ruby-lang.org/
next parent reply other threads:[~2019-10-23 20:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <redmine.issue-16277.20191023202026@ruby-lang.org>
2019-10-23 20:20 ` brad [this message]
2019-10-24 1:49 ` [ruby-core:95522] [Ruby master Bug#16277] UNIXServer#listen fails with Errno::EADDRINUSE error under Windows 10 / WSL Ubuntu 18.04 shyouhei
2019-10-25 15:39 ` [ruby-core:95548] " Greg.mpls
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.ruby-lang.org/en/community/mailing-lists/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=redmine.issue-16277.20191023202026.fe684fa229d91396@ruby-lang.org \
--to=ruby-core@ruby-lang.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).