[#83096] File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?}) — Nobuyoshi Nakada <nobu@...>
On 2017/10/04 8:47, normal@ruby-lang.org wrote:
5 messages
2017/10/04
[#83100] Re: File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?})
— Eric Wong <normalperson@...>
2017/10/04
Nobuyoshi Nakada <nobu@ruby-lang.org> wrote:
[#83105] Re: File.setuid? on IO (Re: [ruby-cvs:67289] normal:r60108 (trunk): file.c: release GVL in File.{setuid?, setgid?, sticky?})
— Nobuyoshi Nakada <nobu@...>
2017/10/04
On 2017/10/04 15:55, Eric Wong wrote:
[#83107] Alias Enumerable#include? to Enumerable#includes? — Alberto Almagro <albertoalmagro@...>
Hello,
9 messages
2017/10/04
[#83113] Re: Alias Enumerable#include? to Enumerable#includes?
— "Urabe, Shyouhei" <shyouhei@...>
2017/10/05
This has been requested countless times, then rejected each and every time.
[#83129] Re: Alias Enumerable#include? to Enumerable#includes?
— Alberto Almagro <albertoalmagro@...>
2017/10/05
Sorry I didn't found it on the core mail list's archive.
[#83138] Re: Alias Enumerable#include? to Enumerable#includes?
— "Urabe, Shyouhei" <shyouhei@...>
2017/10/06
Ruby has not been made of popular votes so far. You have to show us
[#83149] Re: Alias Enumerable#include? to Enumerable#includes?
— Eric Wong <normalperson@...>
2017/10/06
Alberto Almagro <albertoalmagro@gmail.com> wrote:
[#83200] [Ruby trunk Feature#13996] [PATCH] file.c: apply2files releases GVL — normalperson@...
Issue #13996 has been reported by normalperson (Eric Wong).
4 messages
2017/10/10
[ruby-core:83446] [Backport186 Backport#4905] rb_w32_add_socket / rb_w32_remove_socket
From:
usa@...
Date:
2017-10-21 10:39:11 UTC
List:
ruby-core #83446
Issue #4905 has been updated by usa (Usaku NAKAMURA). Tracker changed from Feature to Backport Project changed from Ruby 1.8 to Backport186 1.8 is out of date ---------------------------------------- Backport #4905: rb_w32_add_socket / rb_w32_remove_socket https://bugs.ruby-lang.org/issues/4905#change-67419 * Author: ghazel (Greg Hazel) * Status: Assigned * Priority: Normal * Assignee: usa (Usaku NAKAMURA) ---------------------------------------- It is currently very difficult to use an externally created SOCKET on Windows with ruby 1.8. Authors of all the gems I found (pg, mysql2, curb) got it wrong. This bug is described in detail here ( http://www.ruby-forum.com/topic/869239 ). In the meantime, a small pair of functions would allow gem authors to use SOCKETs, without a significant rewrite of ruby's win32 layer. Attached is a very tiny patch for new functions which will allow gem authors to use externally created sockets on Windows. Their usage is as follows: int fd = libwhatever_get_socket(); #ifdef _WIN32 ruby_fd = rb_w32_add_socket(fd, 0); #else ruby_fd = fd; #endif ... do stuff with the ruby_fd as you would on other platforms ... #ifdef _WIN32 rb_w32_remove_socket(ruby_fd); #endif libwhatever_close_socket(fd); In a nutshell; you pass the SOCKET given to you by the external library to ruby and it gives you a CRT fd you can use with ruby functions. When you're done, you pass that CRT fd to ruby to remove it, and then close the SOCKET however the library normally does. If the ifdefs are not preferred, rb_add_socket / rb_remove_socket could be added as no-ops on non-win32 platforms, however I should stress that making this a permanent fixture of the API is probably a mistake, and the ruby win32 code should be rewritten to use HANDLEs/SOCKETs instead of CRT fds. ---Files-------------------------------- add_socket.1_8.patch (906 Bytes) -- https://bugs.ruby-lang.org/ Unsubscribe: <mailto:ruby-core-request@ruby-lang.org?subject=unsubscribe> <http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>