From luislavena at gmail.com Sat Aug 1 00:25:09 2009 From: luislavena at gmail.com (Luis Lavena) Date: Sat, 1 Aug 2009 01:25:09 -0300 Subject: [Win32utils-devel] What's the plan for support 1.9.x In-Reply-To: References: Message-ID: <71166b3b0907312125m5d901cf7y884804ed379bb75d@mail.gmail.com> On Sat, Aug 1, 2009 at 12:34 AM, Heesob Park wrote: > Hi, > > I tried RubyInstaller preview 1 ruby 1.9.1p129 at > http://rubyinstaller.org/downloads/ . > I noticed the package contains no gems unlike OCI. > > When I tried to install windows-pr, it failed like this: > C:\>gem install windows-pr > Building native extensions. ?This could take a while... > ERROR: ?Error installing windows-pr: > ? ? ? ?ERROR: Failed to build gem native extension. > > c:/Ruby19/bin/ruby.exe extconf.rb > checking for strncpy_s()... *** extconf.rb failed *** > Could not create Makefile due to some reason, probably lack of > necessary libraries and/or headers. ?Check the mkmf.log file for more > details. ?You may need configuration options. > > I know I did not install developer kit. > > Is there any chance of providing binary gem for ruby 1.9.1 mingw32 version? > Does anyone checked the compatibility of the win32-utils with ruby 1.9.x? > Or just do not use win32-utils in ruby 1.9.x? > I have two suggestions: 1) Usage of rake-compiler to generate the extensions, so generation of both mswin32 and mingw32 can happen at the same time http://github.com/luislavena/rake-compiler 2) Generation of "fat-binaries" gems to bundle both 1.8 and 1.9 extensions. This is required since you cannot create equal gem versions but target different ruby versions (discussed over RubyGems-devel list without success). Cheers, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry From djberg96 at gmail.com Sun Aug 2 09:33:02 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Sun, 2 Aug 2009 07:33:02 -0600 Subject: [Win32utils-devel] win32-security, 1.9.x, encoding issue? Message-ID: <000001ca1375$c3ff99d0$4bfecd70$@com> Hi, Windows Vista Home Premium ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-mswin32_90] I noticed there was an ordinal bug in win32-security and Ruby 1.9.x. I fixed those easily enough, but now we're left with this: 1) Error: test_string_to_sid(TC_Win32_Security_Sid): ArgumentError: invalid byte sequence in US-ASCII c:/Users/djberge/workspace/win32-security/lib/win32/security/sid.rb:111:in `strip' c:/Users/djberge/workspace/win32-security/lib/win32/security/sid.rb:111:in `string_to_sid' test/test_sid.rb:62:in `test_string_to_sid' Where line 111 is the last line of this: def self.string_to_sid(string) sid_buf = 0.chr * 80 string_addr = [string].pack('p*').unpack('L')[0] unless ConvertStringSidToSid(string_addr, sid_buf) raise Error, get_last_error end sid_buf.strip end I searched on the web but I wasn't really sure what the best or correct solution was. I really hope we don't have to mess around with file encodings. Regards, Dan From phasis at gmail.com Sun Aug 2 21:00:53 2009 From: phasis at gmail.com (Heesob Park) Date: Mon, 3 Aug 2009 10:00:53 +0900 Subject: [Win32utils-devel] win32-security, 1.9.x, encoding issue? In-Reply-To: <000001ca1375$c3ff99d0$4bfecd70$@com> References: <000001ca1375$c3ff99d0$4bfecd70$@com> Message-ID: Hi, 2009/8/2 Daniel Berger : > Hi, > > Windows Vista Home Premium > ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-mswin32_90] > > I noticed there was an ordinal bug in win32-security and Ruby 1.9.x. I fixed > those easily enough, but now we're left with this: > > ?1) Error: > test_string_to_sid(TC_Win32_Security_Sid): > ArgumentError: invalid byte sequence in US-ASCII > > c:/Users/djberge/workspace/win32-security/lib/win32/security/sid.rb:111:in > `strip' > > c:/Users/djberge/workspace/win32-security/lib/win32/security/sid.rb:111:in > `string_to_sid' > ? ?test/test_sid.rb:62:in `test_string_to_sid' > > Where line 111 is the last line of this: > > def self.string_to_sid(string) > ? sid_buf = 0.chr * 80 > ? string_addr = [string].pack('p*').unpack('L')[0] > > ? unless ConvertStringSidToSid(string_addr, sid_buf) > ? ? ?raise Error, get_last_error > ? end > > ? sid_buf.strip > end > > I searched on the web but I wasn't really sure what the best or correct > solution was. I really hope we don't have to mess around with file > encodings. > Either sid_buf = (0.chr * 80).force_encoding('ASCII-8BIT') or sid_buf.force_encoding('ASCII-8BIT').strip And it means 1.9.x source code is not compatible with 1.8.x. Refer to http://blog.grayproductions.net/articles/ruby_19s_string Regards, Park Heesob From djberg96 at gmail.com Mon Aug 3 10:03:57 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Mon, 3 Aug 2009 08:03:57 -0600 Subject: [Win32utils-devel] win32-security, 1.9.x, encoding issue? In-Reply-To: References: <000001ca1375$c3ff99d0$4bfecd70$@com> Message-ID: <6037b70c0908030703x2bc48b3fm58578656ffcaeb56@mail.gmail.com> On Sun, Aug 2, 2009 at 7:00 PM, Heesob Park wrote: > Hi, > > 2009/8/2 Daniel Berger : >> Hi, >> >> Windows Vista Home Premium >> ruby 1.9.2dev (2009-07-18 trunk 24186) [i386-mswin32_90] >> >> I noticed there was an ordinal bug in win32-security and Ruby 1.9.x. I fixed >> those easily enough, but now we're left with this: >> >> ?1) Error: >> test_string_to_sid(TC_Win32_Security_Sid): >> ArgumentError: invalid byte sequence in US-ASCII >> >> c:/Users/djberge/workspace/win32-security/lib/win32/security/sid.rb:111:in >> `strip' >> >> c:/Users/djberge/workspace/win32-security/lib/win32/security/sid.rb:111:in >> `string_to_sid' >> ? ?test/test_sid.rb:62:in `test_string_to_sid' >> >> Where line 111 is the last line of this: >> >> def self.string_to_sid(string) >> ? sid_buf = 0.chr * 80 >> ? string_addr = [string].pack('p*').unpack('L')[0] >> >> ? unless ConvertStringSidToSid(string_addr, sid_buf) >> ? ? ?raise Error, get_last_error >> ? end >> >> ? sid_buf.strip >> end >> >> I searched on the web but I wasn't really sure what the best or correct >> solution was. I really hope we don't have to mess around with file >> encodings. >> > Either > sid_buf = (0.chr * 80).force_encoding('ASCII-8BIT') > or > sid_buf.force_encoding('ASCII-8BIT').strip > > And it means 1.9.x source code is not compatible with 1.8.x. > > Refer to http://blog.grayproductions.net/articles/ruby_19s_string Thanks. Fixed, updated and released. Regards, Dan From noreply at rubyforge.org Sat Aug 1 07:21:01 2009 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 1 Aug 2009 07:21:01 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Feature Requests-1462 ] Interface for the Windows Tray Message-ID: <20090801112102.1194718581E3@rubyforge.org> Feature Requests item #1462, was opened at 2005-02-06 20:30 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=1462&group_id=85 Category: None Group: None Status: Open Resolution: None Priority: 1 Submitted By: Daniel Berger (djberg96) Assigned to: Nobody (None) Summary: Interface for the Windows Tray Initial Comment: I believe that ActiveState Perl has something called "PerlTray", for creating little icons in the system tray for Perl programs. Perhaps we could create something like this? If it requires a tie-in to something like exerb-win32, so be it. Low priority item. ---------------------------------------------------------------------- Comment By: Roger Pack (rogerdpack) Date: 2009-08-01 11:21 Message: you should checkout visualuruby--it has some tray examples that are quite nice. http://github.com/rogerdpack/visualuruby_here/tree/master http://www.osk.3web.ne.jp/~nyasu/vruby/vrproject-e.html ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=1462&group_id=85 From noreply at rubyforge.org Sat Aug 1 07:21:33 2009 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 1 Aug 2009 07:21:33 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Feature Requests-26818 ] rb_thread_blocking_region for 1.9 Message-ID: <20090801112133.3690618581E0@rubyforge.org> Feature Requests item #26818, was opened at 2009-08-01 11:21 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=26818&group_id=85 Category: win32-api Group: None Status: Open Resolution: None Priority: 3 Submitted By: Roger Pack (rogerdpack) Assigned to: Nobody (None) Summary: rb_thread_blocking_region for 1.9 Initial Comment: Might be nice for the calls to the win32api to not block other threads in 1.9 [if they do]. Much thanks for a grand library. =r ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=26818&group_id=85 From luislavena at gmail.com Fri Aug 7 19:16:41 2009 From: luislavena at gmail.com (Luis Lavena) Date: Fri, 7 Aug 2009 20:16:41 -0300 Subject: [Win32utils-devel] Comments for Daniel Berger blog post Message-ID: <71166b3b0908071616y5309b9c9l1ac4fa529cb706f6@mail.gmail.com> Hey Daniel, I'm trying to leave you a comment on this article you wrote: http://djberg96.livejournal.com/168403.html But since you disabled OpenID and anonyous, I'm not fond to register for another account just to reply your comments. Quoting your post: "" Unfortunately, I've slammed into the cold hard fact that FFI just isn't the grand solution we all hoped it would be. The first problem is that libffi, the underlying source for C based implementations, isn't going to build without the gcc toolchain. That pretty much leaves everyone but Linux, FreeBSD and OS X in the dust, including two heavy hitters, MS Windows and Solaris (if you're using the Sun Studio compiler). "" That is incorrect. Ruby-FFI team worked and integrated rake-compiler project in the build process to be able to deliver a binary gem that install and run flawlessly on both mswin32 (VC6) and mingw32 (GCC). http://github.com/luislavena/rake-compiler/ If you're asking to build it against Visual Studio, of course it will fail, but I suggest you send patches to improve that process, it is now on GitHub: http://github.com/ffi/ffi """ Then there's the issue of JRuby's lack of support for certain parts of C, such as file descriptors, as my attempt to port file-temp demonstrated. """ You have a point over there, but transfering file descriptors across implementations would be impossible, because that would remove the safe lock around the whole managed idea. What about IronRuby? They would face the same issue with file descriptors. """ So now I'm in a dilemma. If I want to write cross-platform code that will work with JRuby and C based implementations, I'm relegated to keeping two (or more) separate source files, one for MRI and one for JRuby. It would more likely be 3, as I'll still need a separate source file for Windows, since the code is radically different from its *nix counterpart most of the time. """ Why so? I mean, you can have several files in the same gem that, based on the platform, get required independently. Perhaps I'm missing your point, but would love to explore the issue you're facing to help you find the balance and a solution """ On top of that I've heard disturbing reports that there is little interest in supporting FFI on Windows, in which case we may as well declare it dead in the water. Whether you like it or not, Windows is a major player and its here to stay. If it's not going to work on Windows you may as well chuck it now and stick with C extensions. """ You can't impose the platform to anyone, even less in the OpenSource community. That's why I've created rake-compiler to help them support us. Now that FFI builds with RubyInstaller and DevKit, bug and patches can be provided by other developers. FFI team announced there will be no official support since the core team doesn't run Windows, but that doesn't mean they are not fond to integrate these changes. Wonder why your negative comment about it or if you haven't heard the news about Ruby-ffi 0.4.0 release with native gems for mingw32 and mswin32. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry From phasis at gmail.com Fri Aug 7 21:36:37 2009 From: phasis at gmail.com (Heesob Park) Date: Sat, 8 Aug 2009 10:36:37 +0900 Subject: [Win32utils-devel] Comments for Daniel Berger blog post In-Reply-To: <71166b3b0908071616y5309b9c9l1ac4fa529cb706f6@mail.gmail.com> References: <71166b3b0908071616y5309b9c9l1ac4fa529cb706f6@mail.gmail.com> Message-ID: Hi Luis, 2009/8/8 Luis Lavena : > Hey Daniel, > > You can't impose the platform to anyone, even less in the OpenSource > community. That's why I've created rake-compiler to help them support > us. > > Now that FFI builds with RubyInstaller and DevKit, bug and patches can > be provided by other developers. FFI team announced there will be no > official support since the core team doesn't run Windows, but that > doesn't mean they are not fond to integrate these changes. > > Wonder why your negative comment about it or if you haven't heard the > news about Ruby-ffi 0.4.0 release with native gems for mingw32 and > mswin32. I guess I'm the source of the negative comment :) I'm always watching ruby-ffi and rubyinstaller mailing list. And I know FFI builds with RubyInstaller and DevKit. Do you have tried to build ruby-ffi 0.4.0 with mswin32 compiler? I tried and it failed. As you now, I have a patched version ruby-ffi-2.0.0 and binary gem. Porting to mswin32 compiler of GCC oriented project is a pain especially in system programming. When I wrote a message on the ruby-ffi forum about the mswin32 patched version, they just commented that why not try mingw32 version. No one ever give an interest on my patch. I guess you dislike mswin32 compiler and have a bias towards ming32. Recently all your posts are focused on mingw32. Don't you want to see mswin32 version of Ruby anymore? Would you summarize why you decide mingw32 version as rubyinstaller platform? Regards, Park Heesob From luislavena at gmail.com Sat Aug 8 19:47:54 2009 From: luislavena at gmail.com (Luis Lavena) Date: Sat, 8 Aug 2009 20:47:54 -0300 Subject: [Win32utils-devel] Comments for Daniel Berger blog post In-Reply-To: References: <71166b3b0908071616y5309b9c9l1ac4fa529cb706f6@mail.gmail.com> Message-ID: <71166b3b0908081647u3d51a876yaa8cce7eb07cd688@mail.gmail.com> On Fri, Aug 7, 2009 at 10:36 PM, Heesob Park wrote: > Hi Luis, > > 2009/8/8 Luis Lavena : >> Hey Daniel, > >> >> [snip] >> >> Wonder why your negative comment about it or if you haven't heard the >> news about Ruby-ffi 0.4.0 release with native gems for mingw32 and >> mswin32. > > I guess I'm the source of the negative comment :) > I'm always watching ruby-ffi and rubyinstaller mailing list. And I > know FFI builds with RubyInstaller and DevKit. > Do you have tried to build ruby-ffi 0.4.0 with mswin32 compiler? I > tried and it failed. No, I no longer have installed or try Visual Studio for any C project anymore. > As you now, I have a patched version ruby-ffi-2.0.0 and binary gem. > Porting to mswin32 compiler of GCC oriented project is a pain > especially in system programming. Indeed I'm fully aware of that particular issue, I've tried several times to build not Ruby but all the dependencies related to it, including GNU ones with VC8 and failed in the process. > When I wrote a message on the ruby-ffi forum about the mswin32 patched > version, they just commented that why not try mingw32 version. No one > ever give an interest on my patch. I believe because there is no way for them to reproduce it or test that it works properly. If they integrate that patch and someone else system installation breaks, then noone will look at you for fixes, but look at FFI team instead. That's how OSS works. > I guess you dislike mswin32 compiler and have a bias towards ming32. > Recently all your posts are focused on mingw32. I dislike unneeded complexity. I dislike spent 3 full weekends getting a handful of Ruby dependencies working just to find out that the performance gain was marginal. A complete waste of time. And all the pain,headaches and blindness caused by staring at Ruby C code to get it work proper didn't made me feel good after. > Don't you want to see mswin32 version of Ruby anymore? Would you > summarize why you decide mingw32 version as rubyinstaller platform? I don't have a problem summarizing it, but perhaps I'm not good with summaries :-P VC8/VC9 links to MSVCR80/90, not MSVCRT.dll, because of that, none of the dependencies Ruby uses can be used. This has been raised every time on Ruby-core, and segfaults because mixing of CRT got my tired. For mswin32 compilers to work, I would have to go, on every release, over the Ruby dependencies and get those build and work with mswin32 compiler, since already provided executables are not going to work, since they link to a different CRT. Going VC8/9 will also break Ruby binary gem compatibility, since gems for VC6 would fail on VC8/9 due the exact same CRT issue and even worse, due incorrect msvcr80-ruby18.dll or msvcr90-ruby18.dll Usage of freely available VC8/9 has not proven advantage over old and obsolete GCC 3.4.5. To be able to use PGO you need paid Visual Studio, so is a negative point to use it as official compiler. Even more complicated is explain to developers that the CRT is no longer a simple DLL but is now an SxS assembly that needs to be referenced and you need to install a Runtime package every time you want to run it. This becomes a issue and put higher the entry point barrier for people wanting to install or use a "packaged" version of a tool. Leave out of the equation 3rd party developers, outside of RubyInstaller team that creates tools that links to binaries which we don't have control, like MySQL, PostgreSQL, Oracle, etc. Even worse, consider how many of those do not care about Windows at all? Believe me, takes a great deal of effort and time to prove them that they can get their projects working on Windows. I've written about this stuff for the past 4 years, been ignored over Ruby-core, ignored over private email and been considered a noob ranting all over Ruby current Windows situation. I've even explored VC8 back in 2007/2008 and even before getting Ruby to build with it instead of GCC. Ruby has not been born to properly interact with Win32API, not even with Windows... 4 layers of functions to be able to get into IO elements? C files fully covered of conditional macros to determine which OS you're in? That sucks. But can't do anything to change that, tried, but I'm alone. Perhaps I'm wrong, or all the above points I've mention means nothing to you. I'm not trying to prove that "my solution" is the the right one, heck, maybe I'm completely wacko and I just do crazy stuff, but had worked for me until now. > Regards, > Regards and have a nice weekend -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry From phasis at gmail.com Sat Aug 8 20:06:09 2009 From: phasis at gmail.com (Heesob Park) Date: Sun, 9 Aug 2009 09:06:09 +0900 Subject: [Win32utils-devel] Comments for Daniel Berger blog post In-Reply-To: <71166b3b0908081647u3d51a876yaa8cce7eb07cd688@mail.gmail.com> References: <71166b3b0908071616y5309b9c9l1ac4fa529cb706f6@mail.gmail.com> <71166b3b0908081647u3d51a876yaa8cce7eb07cd688@mail.gmail.com> Message-ID: Hi, 2009/8/9 Luis Lavena : > On Fri, Aug 7, 2009 at 10:36 PM, Heesob Park wrote: >> Hi Luis, >> >> 2009/8/8 Luis Lavena : >>> Hey Daniel, >> >>> >>> [snip] >>> >>> Wonder why your negative comment about it or if you haven't heard the >>> news about Ruby-ffi 0.4.0 release with native gems for mingw32 and >>> mswin32. >> >> I guess I'm the source of the negative comment :) >> I'm always watching ruby-ffi and rubyinstaller mailing list. And I >> know FFI builds with RubyInstaller and DevKit. >> Do you have tried to build ruby-ffi 0.4.0 with mswin32 compiler? I >> tried and it failed. > > No, I no longer have installed or try Visual Studio for any C project anymore. > >> As you now, I have a patched version ruby-ffi-2.0.0 and binary gem. >> Porting to mswin32 compiler of GCC oriented project is a pain >> especially in system programming. > > Indeed I'm fully aware of that particular issue, I've tried several > times to build not Ruby but all the dependencies related to it, > including GNU ones with VC8 and failed in the process. > >> When I wrote a message on the ruby-ffi forum about the mswin32 patched >> version, they just commented that why not try mingw32 version. No one >> ever give an interest on my patch. > > I believe because there is no way for them to reproduce it or test > that it works properly. If they integrate that patch and someone else > system installation breaks, then noone will look at you for fixes, but > look at FFI team instead. > > That's how OSS works. > >> I guess you dislike mswin32 compiler and have a bias towards ming32. >> Recently all your posts are focused on mingw32. > > I dislike unneeded complexity. I dislike spent 3 full weekends getting > a handful of Ruby dependencies working just to find out that the > performance gain was marginal. A complete waste of time. > > And all the pain,headaches and blindness caused by staring at Ruby C > code to get it work proper didn't made me feel good after. > >> Don't you want to see mswin32 version of Ruby anymore? Would you >> summarize why you decide mingw32 version as rubyinstaller platform? > > I don't have a problem summarizing it, but perhaps I'm not good with > summaries :-P > > VC8/VC9 links to MSVCR80/90, not MSVCRT.dll, because of that, none of > the dependencies Ruby uses can be used. > > This has been raised every time on Ruby-core, and segfaults because > mixing of CRT got my tired. > > For mswin32 compilers to work, I would have to go, on every release, > over the Ruby dependencies and get those build and work with mswin32 > compiler, since already provided executables are not going to work, > since they link to a different CRT. > > Going VC8/9 will also break Ruby binary gem compatibility, since gems > for VC6 would fail on VC8/9 due the exact same CRT issue and even > worse, due incorrect msvcr80-ruby18.dll or msvcr90-ruby18.dll > > Usage of freely available VC8/9 has not proven advantage over old and > obsolete GCC 3.4.5. To be able to use PGO you need paid Visual Studio, > so is a negative point to use it as official compiler. > > Even more complicated is explain to developers that the CRT is no > longer a simple DLL but is now an SxS assembly that needs to be > referenced and you need to install a Runtime package every time you > want to run it. > > This becomes a issue and put higher the entry point barrier for people > wanting to install or use a "packaged" version of a tool. > > Leave out of the equation 3rd party developers, outside of > RubyInstaller team that creates tools that links to binaries which we > don't have control, like MySQL, PostgreSQL, Oracle, etc. > > Even worse, consider how many of those do not care about Windows at > all? Believe me, takes a great deal of effort and time to prove them > that they can get their projects working on Windows. > > I've written about this stuff for the past 4 years, been ignored over > Ruby-core, ignored over private email and been considered a noob > ranting all over Ruby current Windows situation. > > I've even explored VC8 back in 2007/2008 and even before getting Ruby > to build with it instead of GCC. > > Ruby has not been born to properly interact with Win32API, not even > with Windows... 4 layers of functions to be able to get into IO > elements? C files fully covered of conditional macros to determine > which OS you're in? That sucks. > > But can't do anything to change that, tried, but I'm alone. > > Perhaps I'm wrong, or all the above points I've mention means nothing to you. > > I'm not trying to prove that "my solution" is the the right one, heck, > maybe I'm completely wacko and I just do crazy stuff, but had worked > for me until now. > Thanks for your a little long summary :) I understand your situation and despair. Now I really want to know is that the mingw32 compiled dll is compatible with mswin32 version of ruby. Is there any way to make a dll build with mingw32 compiler to compatible both mingw32 and mswin32 version? Regards, Park Heesob From luislavena at gmail.com Sat Aug 8 20:18:46 2009 From: luislavena at gmail.com (Luis Lavena) Date: Sat, 8 Aug 2009 21:18:46 -0300 Subject: [Win32utils-devel] Comments for Daniel Berger blog post In-Reply-To: References: <71166b3b0908071616y5309b9c9l1ac4fa529cb706f6@mail.gmail.com> <71166b3b0908081647u3d51a876yaa8cce7eb07cd688@mail.gmail.com> Message-ID: <71166b3b0908081718g6fb118a1nd9ec03138f6a338c@mail.gmail.com> On Sat, Aug 8, 2009 at 9:06 PM, Heesob Park wrote: > Hi, > > 2009/8/9 Luis Lavena : >> [LONG SNIP] > > Thanks for your a little long summary :) Apologizes, needed to get it out of my chest. I posted about VC8 back in January 2008: http://rubyforge.org/pipermail/rubyinstaller-devel/2008-January/000230.html Taking in consideration was doing what "Average Joe" will do, not being a VS expert or anything like that. Wonder how PGO compilation after running the test can improve those values. > I understand your situation and despair. > > Now I really want to know is that the mingw32 compiled dll is > compatible with mswin32 version of ruby. Is there any way to make a > dll build with mingw32 compiler to compatible both mingw32 and mswin32 > version? > Yes, GCC links and target by default to MSVCRT.DLL, which makes mingw32 binaries compatible with mswin32 ones. Everything will be great as long both target and use the same CRT. Now, the issues are Ruby and Ruby code. There are lot of RUBY_PLATFORM evaluations, so while binaries may be compatible, the Ruby code perhaps not. rake-compiler has been created and improved to allow targeting mswin32 and mingw32 platforms, in the aim to maintain backward compatibility until mingw32 version gets more adopted. Regards, -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry From phasis at gmail.com Sat Aug 8 22:03:40 2009 From: phasis at gmail.com (Heesob Park) Date: Sun, 9 Aug 2009 11:03:40 +0900 Subject: [Win32utils-devel] Comments for Daniel Berger blog post In-Reply-To: <71166b3b0908081718g6fb118a1nd9ec03138f6a338c@mail.gmail.com> References: <71166b3b0908071616y5309b9c9l1ac4fa529cb706f6@mail.gmail.com> <71166b3b0908081647u3d51a876yaa8cce7eb07cd688@mail.gmail.com> <71166b3b0908081718g6fb118a1nd9ec03138f6a338c@mail.gmail.com> Message-ID: 2009/8/9 Luis Lavena : > On Sat, Aug 8, 2009 at 9:06 PM, Heesob Park wrote: >> Hi, >> >> 2009/8/9 Luis Lavena : >>> [LONG SNIP] >> >> Thanks for your a little long summary :) > > Apologizes, needed to get it out of my chest. > > I posted about VC8 back in January 2008: > > http://rubyforge.org/pipermail/rubyinstaller-devel/2008-January/000230.html > > Taking in consideration was doing what "Average Joe" will do, not > being a VS expert or anything like that. > > Wonder how PGO compilation after running the test can improve those values. > >> I understand your situation and despair. >> >> Now I really want to know is that the mingw32 compiled dll is >> compatible with mswin32 version of ruby. Is there any way to make a >> dll build with mingw32 compiler to compatible both mingw32 and mswin32 >> version? >> > > Yes, GCC links and target by default to MSVCRT.DLL, which makes > mingw32 binaries compatible with mswin32 ones. > If mingw32 binaries are compatible with mswin32, I think ffi-0.4.0 binary might be compatible with mswin32_90 version of ruby. What's the way to install ffi-0.4.0 mingw32 binary gem to mswin32_90 version of ruby? > Everything will be great as long both target and use the same CRT. > I'm not sure what you mean by "as long both target and use the same CRT". Regards, Park Heesob From luislavena at gmail.com Sat Aug 8 22:49:12 2009 From: luislavena at gmail.com (Luis Lavena) Date: Sat, 8 Aug 2009 23:49:12 -0300 Subject: [Win32utils-devel] Comments for Daniel Berger blog post In-Reply-To: References: <71166b3b0908071616y5309b9c9l1ac4fa529cb706f6@mail.gmail.com> <71166b3b0908081647u3d51a876yaa8cce7eb07cd688@mail.gmail.com> <71166b3b0908081718g6fb118a1nd9ec03138f6a338c@mail.gmail.com> Message-ID: <71166b3b0908081949o5b86f647r30162bb949e76e4a@mail.gmail.com> On Sat, Aug 8, 2009 at 11:03 PM, Heesob Park wrote: > 2009/8/9 Luis Lavena : >> On Sat, Aug 8, 2009 at 9:06 PM, Heesob Park wrote: >>> Hi, >>> >>> 2009/8/9 Luis Lavena : >>>> [LONG SNIP] >>> >>> Thanks for your a little long summary :) >> >> Apologizes, needed to get it out of my chest. >> >> I posted about VC8 back in January 2008: >> >> http://rubyforge.org/pipermail/rubyinstaller-devel/2008-January/000230.html >> >> Taking in consideration was doing what "Average Joe" will do, not >> being a VS expert or anything like that. >> >> Wonder how PGO compilation after running the test can improve those values. >> >>> I understand your situation and despair. >>> >>> Now I really want to know is that the mingw32 compiled dll is >>> compatible with mswin32 version of ruby. Is there any way to make a >>> dll build with mingw32 compiler to compatible both mingw32 and mswin32 >>> version? >>> >> >> Yes, GCC links and target by default to MSVCRT.DLL, which makes >> mingw32 binaries compatible with mswin32 ones. >> > > If mingw32 binaries are compatible with mswin32, I think ffi-0.4.0 > binary might be compatible with mswin32_90 version of ruby. Well no, if memory is allocated by mswin32 ffi, it cannot be GC by mswin32_90 Ruby. > What's the way to install ffi-0.4.0 mingw32 binary gem to mswin32_90 > version of ruby? > gem install ... --platform=i386-mswin32 But use it at your own risk. >> Everything will be great as long both target and use the same CRT. >> > I'm not sure what you mean by "as long both target and use the same CRT". > Memory allocation and free'd must be done by the same CRT functions, on the exact same library, cannot be performed by different CRT set of functions. That leads to segfaults. -- Luis Lavena AREA 17 - Perfection in design is achieved not when there is nothing more to add, but rather when there is nothing more to take away. Antoine de Saint-Exup?ry From djberg96 at gmail.com Mon Aug 10 19:57:45 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Mon, 10 Aug 2009 17:57:45 -0600 Subject: [Win32utils-devel] OLE, properties and methods Message-ID: <009301ca1a16$5cb6ffa0$1624fee0$@com> Hi, With win32ole is there a way to list the available properties or methods of an OLE object? For example, with win32-sapi, the SpAudioFormat object has two properties (Guid and Type) and two methods (GetWaveFormatEx, SetWaveFormatEx). How do I list them? Regards, Dan From phasis at gmail.com Mon Aug 10 21:15:10 2009 From: phasis at gmail.com (Heesob Park) Date: Tue, 11 Aug 2009 10:15:10 +0900 Subject: [Win32utils-devel] OLE, properties and methods In-Reply-To: <009301ca1a16$5cb6ffa0$1624fee0$@com> References: <009301ca1a16$5cb6ffa0$1624fee0$@com> Message-ID: Hi, 2009/8/11 Daniel Berger : > Hi, > > With win32ole is there a way to list the available properties or methods of > an OLE object? > > For example, with win32-sapi, the SpAudioFormat object has two properties > (Guid and Type) and two methods (GetWaveFormatEx, SetWaveFormatEx). How do I > list them? > Do you want this? irb(main):001:0> require "win32/sapi5" => true irb(main):002:0> include Win32 => Object irb(main):003:0> s = SpAudioFormat.new => # irb(main):004:0> s.ole_get_methods => [Type, Guid] irb(main):005:0> s.ole_methods => [QueryInterface, AddRef, Release, GetTypeInfoCount, GetTypeInfo, GetIDsOfName s, Invoke, Type, Type, Guid, Guid, GetWaveFormatEx, SetWaveFormatEx, GetTypeInfo Count, GetTypeInfo, GetIDsOfNames, Invoke] irb(main):006:0> s.ole_func_methods => [QueryInterface, AddRef, Release, GetTypeInfoCount, GetTypeInfo, GetIDsOfName s, Invoke, GetWaveFormatEx, SetWaveFormatEx, GetTypeInfoCount, GetTypeInfo, GetI DsOfNames, Invoke] irb(main):007:0> s.ole_put_methods => [Type, Guid] Regards, Park Heesob From djberg96 at gmail.com Tue Aug 11 10:22:40 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Tue, 11 Aug 2009 08:22:40 -0600 Subject: [Win32utils-devel] OLE, properties and methods In-Reply-To: References: <009301ca1a16$5cb6ffa0$1624fee0$@com> Message-ID: <00b501ca1a8f$3197fc10$94c7f430$@com> > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org [mailto:win32utils-devel- > bounces at rubyforge.org] On Behalf Of Heesob Park > Sent: Monday, August 10, 2009 7:15 PM > To: Development and ideas for win32utils projects > Subject: Re: [Win32utils-devel] OLE, properties and methods > > Hi, > > 2009/8/11 Daniel Berger : > > Hi, > > > > With win32ole is there a way to list the available properties or > methods of > > an OLE object? > > > > For example, with win32-sapi, the SpAudioFormat object has two > properties > > (Guid and Type) and two methods (GetWaveFormatEx, SetWaveFormatEx). > How do I > > list them? > > > Do you want this? > > irb(main):001:0> require "win32/sapi5" > => true > irb(main):002:0> include Win32 > => Object > irb(main):003:0> s = SpAudioFormat.new > => # > irb(main):004:0> s.ole_get_methods > => [Type, Guid] > irb(main):005:0> s.ole_methods > => [QueryInterface, AddRef, Release, GetTypeInfoCount, GetTypeInfo, > GetIDsOfName > s, Invoke, Type, Type, Guid, Guid, GetWaveFormatEx, SetWaveFormatEx, > GetTypeInfo > Count, GetTypeInfo, GetIDsOfNames, Invoke] > irb(main):006:0> s.ole_func_methods > => [QueryInterface, AddRef, Release, GetTypeInfoCount, GetTypeInfo, > GetIDsOfName > s, Invoke, GetWaveFormatEx, SetWaveFormatEx, GetTypeInfoCount, > GetTypeInfo, GetI > DsOfNames, Invoke] > irb(main):007:0> s.ole_put_methods > => [Type, Guid] Thanks. I just realized that the latest 1.8.6p-368 actually has documentation for win32ole.c embedded in it now. I'm not a fan of the method names they chose. I might put in some aliases in pr-win32ole. :) Regards, Dan From djberg96 at gmail.com Tue Aug 11 19:40:48 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Tue, 11 Aug 2009 17:40:48 -0600 Subject: [Win32utils-devel] Comments for Daniel Berger blog post In-Reply-To: <71166b3b0908071616y5309b9c9l1ac4fa529cb706f6@mail.gmail.com> References: <71166b3b0908071616y5309b9c9l1ac4fa529cb706f6@mail.gmail.com> Message-ID: <6037b70c0908111640m7d2be0e0g330903f7b4463964@mail.gmail.com> Hi, On Fri, Aug 7, 2009 at 5:16 PM, Luis Lavena wrote: > Hey Daniel, > > I'm trying to leave you a comment on this article you wrote: > > http://djberg96.livejournal.com/168403.html > > But since you disabled OpenID and anonyous, I'm not fond to register > for another account just to reply your comments. I don't see a way to allow OpenID on LJ. If there's a way, I'll enable that. I won't allow anonymous comments, though. > Quoting your post: > > "" > Unfortunately, I've slammed into the cold hard fact that FFI just > isn't the grand solution we all hoped it would be. The first problem > is that libffi, the underlying source for C based implementations, > isn't going to build without the gcc toolchain. That pretty much > leaves everyone but Linux, FreeBSD and OS X in the dust, including two > heavy hitters, MS Windows and Solaris (if you're using the Sun Studio > compiler). > "" > > That is incorrect. Ruby-FFI team worked and integrated rake-compiler > project in the build process to be able to deliver a binary gem that > install and run flawlessly on both mswin32 (VC6) and mingw32 (GCC). > > http://github.com/luislavena/rake-compiler/ > > If you're asking to build it against Visual Studio, of course it will > fail, but I suggest you send patches to improve that process, it is > now on GitHub: > > http://github.com/ffi/ffi I'm not going to install mingw just so I can build FFI. If we can get it to build with VS that would be great. > """ > Then there's the issue of JRuby's lack of support for certain parts of > C, such as file descriptors, as my attempt to port file-temp > demonstrated. > """ > > You have a point over there, but transfering file descriptors across > implementations would be impossible, because that would remove the > safe lock around the whole managed idea. If I can't get at low level details with JRuby, like file descriptors and pointer function addresses, then JRuby is officially hopeless as a system's programming language. > What about IronRuby? They would face the same issue with file descriptors. We'll have to wait and see, but somehow I doubt it. > """ > So now I'm in a dilemma. If I want to write cross-platform code that > will work with JRuby and C based implementations, I'm relegated to > keeping two (or more) separate source files, one for MRI and one for > JRuby. It would more likely be 3, as I'll still need a separate source > file for Windows, since the code is radically different from its *nix > counterpart most of the time. > """ > > Why so? I mean, you can have several files in the same gem that, based > on the platform, get required independently. Perhaps I'm missing your > point, but would love to explore the issue you're facing to help you > find the balance and a solution People keep telling me this, but I've yet to see it in practice. As far as I can tell you have to generate the gems up front. I don't see a way to dynamically determine, at the point of installation, which file should be considered the "real" file. Please take a look at sys-proctable for the most extreme case of variable source code, and tell me how you would handle it. > """ > On top of that I've heard disturbing reports that there is little > interest in supporting FFI on Windows, in which case we may as well > declare it dead in the water. Whether you like it or not, Windows is a > major player and its here to stay. If it's not going to work on > Windows you may as well chuck it now and stick with C extensions. > """ > > You can't impose the platform to anyone, even less in the OpenSource > community. That's why I've created rake-compiler to help them support > us. > > Now that FFI builds with RubyInstaller and DevKit, bug and patches can > be provided by other developers. FFI team announced there will be no > official support since the core team doesn't run Windows, but that > doesn't mean they are not fond to integrate these changes. > > Wonder why your negative comment about it or if you haven't heard the > news about Ruby-ffi 0.4.0 release with native gems for mingw32 and > mswin32. I didn't know about it. I will try ruby-ffi 0.4.0 and see how it goes. Honestly, though, if JRuby can't support some of the features I want, I don't see any point in converting most of my current C extensions to FFI. Then people can choose whatever compiler they wish. :) Regards, Dan From noreply at rubyforge.org Wed Aug 12 18:48:16 2009 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 12 Aug 2009 18:48:16 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Feature Requests-26914 ] Add a Process.hide method Message-ID: <20090812224816.1EDA618581F3@rubyforge.org> Feature Requests item #26914, was opened at 2009-08-12 15:48 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=26914&group_id=85 Category: win32-process Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Nobody (None) Summary: Add a Process.hide method Initial Comment: I saw this Perl module and thought it might be worth porting: http://search.cpan.org/~rootkwok/Win32-Process-Hide-1.8442/lib/Win32/Process/Hide.pm Regards, Dan (me) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=26914&group_id=85 From djberg96 at gmail.com Thu Aug 13 07:51:13 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Thu, 13 Aug 2009 05:51:13 -0600 Subject: [Win32utils-devel] if_indextoname on Windows? Message-ID: <00d901ca1c0c$5d747920$185d6b60$@com> Hi all, Windows Vista Home Premium VC++ 9 According to MSDN, the if_indextoname() function should be included on Vista: http://msdn.microsoft.com/en-us/library/bb408408%28VS.85%29.aspx However, I can't get mkmf to see it. I tried all of these: require 'mkmf' if have_header('netioapi.h') # yes have_func('if_indextoname', 'netioapi.h') # no have_func('if_nametoindex', 'netioapi.h') # no end if have_header('iphlpapi.h') # yes have_func('if_indextoname', 'iphlpapi.h') # no have_func('if_nametoindex', 'iphlpapi.h') # no end have_library('iphlpapi') # yes have_library('iphlpapi', 'if_indextoname') # no What gives? BTW, this is in an effort to get dnssd to build on Windows. Regards, Dan From phasis at gmail.com Thu Aug 13 11:38:38 2009 From: phasis at gmail.com (Heesob Park) Date: Fri, 14 Aug 2009 00:38:38 +0900 Subject: [Win32utils-devel] if_indextoname on Windows? In-Reply-To: <00d901ca1c0c$5d747920$185d6b60$@com> References: <00d901ca1c0c$5d747920$185d6b60$@com> Message-ID: Hi Dan, 2009/8/13 Daniel Berger : > Hi all, > > Windows Vista Home Premium > VC++ 9 > > According to MSDN, the if_indextoname() function should be included on > Vista: > > http://msdn.microsoft.com/en-us/library/bb408408%28VS.85%29.aspx > > However, I can't get mkmf to see it. I tried all of these: > > require 'mkmf' > > if have_header('netioapi.h') # yes > ?have_func('if_indextoname', 'netioapi.h') # no > ?have_func('if_nametoindex', 'netioapi.h') # no > end > > if have_header('iphlpapi.h') # yes > ?have_func('if_indextoname', 'iphlpapi.h') # no > ?have_func('if_nametoindex', 'iphlpapi.h') # no > end > > have_library('iphlpapi') # yes > have_library('iphlpapi', 'if_indextoname') # no > > What gives? > > BTW, this is in an effort to get dnssd to build on Windows. > Here is my result: First, you must build ruby with --with-winsock2 option. Second, WIN32_LEAN_AND_MEAN macro must not used. C:\>irb irb(main):001:0> require 'mkmf' => true irb(main):002:0> COMMON_HEADERS.replace("#include ") => "#include " irb(main):003:0> have_header('netioapi.h') checking for netioapi.h... yes => true irb(main):004:0> have_func('if_indextoname', 'netioapi.h') checking for if_indextoname() in netioapi.h... no => false irb(main):005:0> have_func('if_indextoname', 'iphlpapi.h') checking for if_indextoname() in iphlpapi.h... no => false irb(main):006:0> have_library('iphlpapi', 'if_indextoname', 'netioapi.h') checking for if_indextoname() in iphlpapi.lib... yes => true irb(main):007:0> have_func('if_indextoname', 'netioapi.h') checking for if_indextoname() in netioapi.h... yes => true irb(main):008:0> have_func('if_nametoindex','netioapi.h') checking for if_nametoindex() in netioapi.h... yes => true irb(main):009:0> have_library('iphlpapi', 'if_nametoindex', 'netioapi.h') checking for if_nametoindex() in iphlpapi.lib... yes => true Regards, Park Heesob From djberg96 at gmail.com Thu Aug 13 12:20:31 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Thu, 13 Aug 2009 10:20:31 -0600 Subject: [Win32utils-devel] if_indextoname on Windows? In-Reply-To: References: <00d901ca1c0c$5d747920$185d6b60$@com> Message-ID: <6037b70c0908130920k249a4295v8d662ea68550d770@mail.gmail.com> Hi, > Here is my result: > > First, you must build ruby with --with-winsock2 option. Oh, Ruby itself has to be rebuilt? Oof. I'm actually curious why winsock2.h isn't the default. I vaguely recall this coming up at some point before but I've forgotten why now. > Second, WIN32_LEAN_AND_MEAN macro must not used. That means modifying the source, right? Or is there a way to undef it from extconf.rb? > C:\>irb > irb(main):001:0> require 'mkmf' > => true > irb(main):002:0> COMMON_HEADERS.replace("#include ") > => "#include " > irb(main):003:0> have_header('netioapi.h') > checking for netioapi.h... yes > => true > irb(main):004:0> have_func('if_indextoname', 'netioapi.h') > checking for if_indextoname() in netioapi.h... no > => false > irb(main):005:0> have_func('if_indextoname', 'iphlpapi.h') > checking for if_indextoname() in iphlpapi.h... no > => false > irb(main):006:0> have_library('iphlpapi', 'if_indextoname', 'netioapi.h') > checking for if_indextoname() in iphlpapi.lib... yes > => true > irb(main):007:0> have_func('if_indextoname', 'netioapi.h') > checking for if_indextoname() in netioapi.h... yes > => true > irb(main):008:0> have_func('if_nametoindex','netioapi.h') > checking for if_nametoindex() in netioapi.h... yes > => true > irb(main):009:0> have_library('iphlpapi', 'if_nametoindex', 'netioapi.h') > checking for if_nametoindex() in iphlpapi.lib... yes > => true Excellent, thank you. Regards, Dan From djberg96 at gmail.com Sun Aug 16 16:14:55 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Sun, 16 Aug 2009 14:14:55 -0600 Subject: [Win32utils-devel] win32-api, unsigned long vs long in api_call Message-ID: <6037b70c0908161314w2ecd58bepd276ab5aa394e432@mail.gmail.com> Hi, I noticed this bug: Windows XP Pro Ruby 1.8.6-p383 built with VC++ 9 win32-api 1.4.3 C:\>irb irb(main):001:0> require 'win32/api' => true irb(main):002:0> GetFileAttributes = Win32::API.new('GetFileAttributes', 'S', 'L') => # irb(main):003:0> GetFileAttributes.call("C:/aaabbbcccxxx") # bogus file, should return -1 => 4294967295 I looked at win32-api.c, line 743, and I saw that, in the api_call function, we've declared the return_value variable an unsigned long. I changed it to a signed long as well as switching a ULONG2NUM call to LONG2NUM and that fixed it. I'm kinda shocked I didn't see this until now. Is there any reason for me not to apply this change immediately? I'm trying to remember why I made it unsigned to begin with. Regards, Dan From djberg96 at gmail.com Wed Aug 19 11:07:03 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Wed, 19 Aug 2009 09:07:03 -0600 Subject: [Win32utils-devel] win32-api, unsigned long vs long in api_call In-Reply-To: <6037b70c0908161314w2ecd58bepd276ab5aa394e432@mail.gmail.com> References: <6037b70c0908161314w2ecd58bepd276ab5aa394e432@mail.gmail.com> Message-ID: <6037b70c0908190807l681c0623t935f7387ee80022b@mail.gmail.com> On Sun, Aug 16, 2009 at 2:14 PM, Daniel Berger wrote: > Hi, > > I noticed this bug: > > Windows XP Pro > Ruby 1.8.6-p383 built with VC++ 9 > win32-api 1.4.3 > > C:\>irb > irb(main):001:0> require 'win32/api' > => true > irb(main):002:0> GetFileAttributes = > Win32::API.new('GetFileAttributes', 'S', 'L') > => # > irb(main):003:0> GetFileAttributes.call("C:/aaabbbcccxxx") # bogus > file, should return -1 > => 4294967295 > > I looked at win32-api.c, line 743, and I saw that, in the api_call > function, we've declared the return_value variable an unsigned long. I > changed it to a signed long as well as switching a ULONG2NUM call to > LONG2NUM and that fixed it. > > I'm kinda shocked I didn't see this until now. Is there any reason for > me not to apply this change immediately? I'm trying to remember why I > made it unsigned to begin with. I've gone ahead and changed it for 1.4.4. If it turns out to be a critical mistake I'll undo it. Regards, Dan From djberg96 at gmail.com Fri Aug 21 12:59:27 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Fri, 21 Aug 2009 10:59:27 -0600 Subject: [Win32utils-devel] File.exists?("A:") on Windows VM Message-ID: <4A8ED26F.6070003@gmail.com> Hi, I've got a Windows XP VM on my OS X box. Whenever I call File.exists?("A:") on it I get a system error pop-up box from Windows. The title of the window is "Windows - No Disk" and the error is "Exception Processing Message" followed by some numeric codes. It's not a huge deal - eventually control returns to the program and it returns false as expected once you click on "continue" a couple of times - but I was hoping to see this pop-up at all, as it kinda mucks up the win32-file test suite. Note that I don't see this behavior on a 'regular' windows install. Just the VM. Any suggestions as to how to best handle this in a test suite? Regards, Dan From noreply at rubyforge.org Fri Aug 21 13:52:37 2009 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 21 Aug 2009 13:52:37 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-26975 ] Two test failures on XP virtual machine Message-ID: <20090821175237.4043218581E4@rubyforge.org> Bugs item #26975, was opened at 2009-08-21 10:52 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=26975&group_id=85 Category: win32-sapi Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Nobody (None) Summary: Two test failures on XP virtual machine Initial Comment: Ruby 1.8.6-p383 VC++ 9 Windows XP Pro (VM via VMWare Fusion) On my XP VM I get the following test failures: C:\Documents and Settings\djberge\workspace\win32-sapi>rake test (in C:/Documents and Settings/djberge/workspace/win32-sapi) C:/Ruby/bin/ruby.exe -w -I"lib" "C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader.rb" "test/test_win32_sapi5.rb" Loaded suite C:/Ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake/rake_test_loader Started ...F.........F...... Finished in 0.375 seconds. 1) Failure: test_SpInProcRecoContext(TC_Win32_SAPI5) [./test/test_win32_sapi5.rb:38]: Exception raised: Class: Message: <"failed to create WIN32OLE object from `{73AD6842-ACE0-45E8-A4DD-8795881A2C2A}'\n HRESULT error code:0x8004503a\n "> ---Backtrace--- ./lib/win32/sapi5.rb:51:in `initialize' ./lib/win32/sapi5.rb:51:in `initialize' ./test/test_win32_sapi5.rb:38:in `new' ./test/test_win32_sapi5.rb:38:in `test_SpInProcRecoContext' ./test/test_win32_sapi5.rb:38:in `test_SpInProcRecoContext' --------------- 2) Failure: test_SpSharedRecoContext(TC_Win32_SAPI5) [./test/test_win32_sapi5.rb:78]: Exception raised: Class: Message: <"failed to create WIN32OLE object from `{47206204-5ECA-11D2-960F-00C04F8EE628}'\n HRESULT error code:0x8004503a\n "> ---Backtrace--- ./lib/win32/sapi5.rb:144:in `initialize' ./lib/win32/sapi5.rb:144:in `initialize' ./test/test_win32_sapi5.rb:78:in `new' ./test/test_win32_sapi5.rb:78:in `test_SpSharedRecoContext' ./test/test_win32_sapi5.rb:78:in `test_SpSharedRecoContext' --------------- 20 tests, 20 assertions, 2 failures, 0 errors rake aborted! Command failed with status (1): [C:/Ruby/bin/ruby.exe -w -I"lib" "C:/Ruby/l...] (See full trace by running task with --trace) Simply not supported? Or are they actually different values? Regards, Dan (me) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=26975&group_id=85 From waynev at gmail.com Fri Aug 21 15:03:34 2009 From: waynev at gmail.com (Wayne Vucenic) Date: Fri, 21 Aug 2009 12:03:34 -0700 Subject: [Win32utils-devel] File.exists?("A:") on Windows VM In-Reply-To: <4A8ED26F.6070003@gmail.com> References: <4A8ED26F.6070003@gmail.com> Message-ID: <88c9ce410908211203j4c1e5421uf6a64be96bcca622@mail.gmail.com> Hi Dan, I've had various problem with VMWare Fusion, so I've recently started using Sun's free VirtualBox VM: http://www.virtualbox.org/ VirtualBox has more or less a comparable feature set with Fusion, and I have a Vista Desktop that VMWare Player won't run on, but that VirtualBox works on fine. I'm not running Windows inside VirtualBox, so I can't try to recreate the issues you're seeing, but it might be worth giving VirtualBox a try. For the record, Ubuntu 9.04 crashes a lot inside VirtualBox on OS X, but judging by the mailing lists, that seems to be a problem that's specific to Ubuntu on VirtualBox on OS X, so shouldn't be relevant to your situation. I hope to see you at RubyConf San Francisco! Best regards, Wayne On Fri, Aug 21, 2009 at 9:59 AM, Daniel Berger wrote: > Hi, > > I've got a Windows XP VM on my OS X box. Whenever I call File.exists?("A:") > on it I get a system error pop-up box from Windows. > > The title of the window is "Windows - No Disk" and the error is "Exception > Processing Message" followed by some numeric codes. > > It's not a huge deal - eventually control returns to the program and it > returns false as expected once you click on "continue" a couple of times - > but I was hoping to see this pop-up at all, as it kinda mucks up the > win32-file test suite. > > Note that I don't see this behavior on a 'regular' windows install. Just the > VM. > > Any suggestions as to how to best handle this in a test suite? > > Regards, > > Dan > _______________________________________________ > win32utils-devel mailing list > win32utils-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/win32utils-devel > From djberg96 at gmail.com Fri Aug 21 15:29:29 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Fri, 21 Aug 2009 13:29:29 -0600 Subject: [Win32utils-devel] File.exists?("A:") on Windows VM In-Reply-To: <88c9ce410908211203j4c1e5421uf6a64be96bcca622@mail.gmail.com> References: <4A8ED26F.6070003@gmail.com> <88c9ce410908211203j4c1e5421uf6a64be96bcca622@mail.gmail.com> Message-ID: <4A8EF599.5070501@gmail.com> Wayne Vucenic wrote: > > On Fri, Aug 21, 2009 at 9:59 AM, Daniel Berger wrote: >> Hi, >> >> I've got a Windows XP VM on my OS X box. Whenever I call File.exists?("A:") >> on it I get a system error pop-up box from Windows. >> >> The title of the window is "Windows - No Disk" and the error is "Exception >> Processing Message" followed by some numeric codes. >> >> It's not a huge deal - eventually control returns to the program and it >> returns false as expected once you click on "continue" a couple of times - >> but I was hoping to see this pop-up at all, as it kinda mucks up the >> win32-file test suite. >> >> Note that I don't see this behavior on a 'regular' windows install. Just the >> VM. >> >> Any suggestions as to how to best handle this in a test suite? > Hi Dan, > > I've had various problem with VMWare Fusion, so I've recently started > using Sun's free VirtualBox VM: > http://www.virtualbox.org/ > > VirtualBox has more or less a comparable feature set with Fusion, and > I have a Vista Desktop that VMWare Player won't run on, but that > VirtualBox works on fine. > > I'm not running Windows inside VirtualBox, so I can't try to recreate > the issues you're seeing, but it might be worth giving VirtualBox a > try. > > For the record, Ubuntu 9.04 crashes a lot inside VirtualBox on OS X, > but judging by the mailing lists, that seems to be a problem that's > specific to Ubuntu on VirtualBox on OS X, so shouldn't be relevant to > your situation. > > I hope to see you at RubyConf San Francisco! > > Best regards, > > Wayne Hi Wayne, I spent $50 on VMWare Fusion, so I'm sorta determined to use it. Besides, it's worked pretty well for the most part. I've got several different VM's running, including Ubuntu, Windows 2000, Windows XP Pro, FreeBSD 7, Solaris 10 and even Haiku. So far the only VM that's given me real issue is Windows 2000. I'm not sure why, but every once in a while I have to shut it down and restart it. Otherwise, things have run pretty smoothly. Well, after I upgraded my RAM to 6gb they ran smoothly. ;) In any case, I seem to recall a Windows function that suppresses those pop-up error windows, but I can't remember what it is. I think that's the route I'll have to take. I don't think I'll be at RubyConf, unfortunately. I need to job hunt. That, or get off my butt and start my own Ruby/Windows consulting company. :) Regards, Dan From djberg96 at gmail.com Fri Aug 21 18:04:03 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Fri, 21 Aug 2009 16:04:03 -0600 Subject: [Win32utils-devel] GetTokenInformation failure on XP VM Message-ID: <6037b70c0908211504l1b6a66d1m382607f81f9ef1fe@mail.gmail.com> Hi, Any idea why this would fail on XP Pro, SP 3? It works fine on Vista home premium. I'm getting "The parameter is incorrect." # test.rb require 'windows/security' require 'windows/process' require 'windows/error' include Windows::Error include Windows::Process include Windows::Security token = 0.chr * 4 unless OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, token) raise get_last_error end token = token.unpack('V')[0] te = 0.chr * 4 # TOKEN_ELEVATION rl = 0.chr * 4 # Return length bool = GetTokenInformation( token, TokenElevation, te, te.size, rl ) unless bool raise get_last_error # => The parameter is incorrect. end p te.unpack('L').first Regards, Dan From phasis at gmail.com Fri Aug 21 21:01:16 2009 From: phasis at gmail.com (Heesob Park) Date: Sat, 22 Aug 2009 10:01:16 +0900 Subject: [Win32utils-devel] GetTokenInformation failure on XP VM In-Reply-To: <6037b70c0908211504l1b6a66d1m382607f81f9ef1fe@mail.gmail.com> References: <6037b70c0908211504l1b6a66d1m382607f81f9ef1fe@mail.gmail.com> Message-ID: Hi, 2009/8/22 Daniel Berger : > Hi, > > Any idea why this would fail on XP Pro, SP 3? It works fine on Vista > home premium. > > I'm getting "The parameter is incorrect." > > # test.rb > require 'windows/security' > require 'windows/process' > require 'windows/error' > include Windows::Error > include Windows::Process > include Windows::Security > > token = 0.chr * 4 > > unless OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, token) > ? raise get_last_error > end > > token = token.unpack('V')[0] > > te = 0.chr * 4 # TOKEN_ELEVATION > rl = 0.chr * 4 # Return length > > bool = GetTokenInformation( > ? token, > ? TokenElevation, > ? te, > ? te.size, > ? rl > ) > > unless bool > ? raise get_last_error ?# => The parameter is incorrect. > end > > p te.unpack('L').first > TOKEN_ELEVATION structure is not supported on Windows XP/2000. Refer to http://msdn.microsoft.com/en-us/library/bb530717(VS.85).aspx Regards, Park Heesob From djberg96 at gmail.com Fri Aug 21 21:00:45 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Fri, 21 Aug 2009 19:00:45 -0600 Subject: [Win32utils-devel] GetTokenInformation failure on XP VM In-Reply-To: References: <6037b70c0908211504l1b6a66d1m382607f81f9ef1fe@mail.gmail.com> Message-ID: <4A8F433D.3060108@gmail.com> Heesob Park wrote: > Hi, > > 2009/8/22 Daniel Berger : >> Hi, >> >> Any idea why this would fail on XP Pro, SP 3? It works fine on Vista >> home premium. >> >> I'm getting "The parameter is incorrect." >> >> # test.rb >> require 'windows/security' >> require 'windows/process' >> require 'windows/error' >> include Windows::Error >> include Windows::Process >> include Windows::Security >> >> token = 0.chr * 4 >> >> unless OpenProcessToken(GetCurrentProcess(), TOKEN_QUERY, token) >> raise get_last_error >> end >> >> token = token.unpack('V')[0] >> >> te = 0.chr * 4 # TOKEN_ELEVATION >> rl = 0.chr * 4 # Return length >> >> bool = GetTokenInformation( >> token, >> TokenElevation, >> te, >> te.size, >> rl >> ) >> >> unless bool >> raise get_last_error # => The parameter is incorrect. >> end >> >> p te.unpack('L').first >> > TOKEN_ELEVATION structure is not supported on Windows XP/2000. > > Refer to http://msdn.microsoft.com/en-us/library/bb530717(VS.85).aspx Oh, that's right. I forgot that method was implemented for Vista. It's a bug in the test win32-security test suite then. I need to omit the test for that method unless it's Vista or later. Regards, Dan From djberg96 at gmail.com Fri Aug 21 21:02:15 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Fri, 21 Aug 2009 19:02:15 -0600 Subject: [Win32utils-devel] [Fwd: Re: FW: win32-api, unsigned long vs long in api_call] Message-ID: <4A8F4397.9040100@gmail.com> Moving this conversation over to win32utils-devel... -------------- next part -------------- An embedded message was scrubbed... From: Heesob Park Subject: Re: FW: win32-api, unsigned long vs long in api_call Date: Sat, 22 Aug 2009 09:54:05 +0900 Size: 2777 URL: From djberg96 at gmail.com Fri Aug 21 21:29:41 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Fri, 21 Aug 2009 19:29:41 -0600 Subject: [Win32utils-devel] [Fwd: Re: FW: win32-api, unsigned long vs long in api_call] In-Reply-To: <4A8F4397.9040100@gmail.com> References: <4A8F4397.9040100@gmail.com> Message-ID: <6037b70c0908211829jd7e478g5ba3898a087753fa@mail.gmail.com> On Fri, Aug 21, 2009 at 7:02 PM, Daniel Berger wrote: > Moving this conversation over to win32utils-devel... > > Hi, > > 2009/8/22 Daniel Berger : >> Hi, >> >> >> >>>> Ok, I looked at those functions. They return a BSTR, which is >>>> ultimately an unsigned int, right? Or is it required for HRESULT's? >>>> >>> A BSTR is a pointer. It is defined in OLEAuto.h as follows: >>> typedef OLECHAR FAR * BSTR; >>> >>> Ultimately we need a pointer type represented by unsigned long. >> >> Perhaps we should have 'l' and 'L', 's' and 'S'. The lowercase letters >> would be signed and the uppercase would be unsigned. This would follow >> the tradition of pack/unpack. >> > That's OK. Oops, that should have been 'i' and 'I', not 's' and 'S'. >>>> I'm just trying to make sure I understand where and why we need it so >>>> I can document it clearly if/when we add a 'U' type. It will also mean >>>> having to update windows-pr I suppose. >>>> >>> I think we need signed long type instead of unsigned long. >>> A lot of API functions return unsigned long such as DWORD, HANDLE, BOOL. >>> >>> The function GetFileAttributes also returns DWORD value. >>> And INVALID_FILE_ATTRIBUTES is not -1 but defined as >>> #define INVALID_FILE_ATTRIBUTES ((DWORD)-1) >> >> It seems strange to cast -1 like that. Is it just to avoid warnings? >> > Not a strange to me. (DWORD)-1 is 0xFFFFFFFF. > >> In any case, how do we handle this in a generic way? I mean, >> GetFileAttributes returns a DWORD, but we have to be able to return >> the possibility of -1, right? >> > If a function returns DWORD type, the return value cannot be -1. -1 is > human readable value. It is actually 0xFFFFFFFF. Alright, then I should probably change INVALID_HANDLE_VALUE to 0xFFFFFFFF, and revert 'L' to an unsigned long. I think there are a handful of other -1 values that should be changed then, too, in windows-pr. Regards, Dan From djberg96 at gmail.com Fri Aug 21 21:35:20 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Fri, 21 Aug 2009 19:35:20 -0600 Subject: [Win32utils-devel] [Fwd: Re: FW: win32-api, unsigned long vs long in api_call] In-Reply-To: <6037b70c0908211829jd7e478g5ba3898a087753fa@mail.gmail.com> References: <4A8F4397.9040100@gmail.com> <6037b70c0908211829jd7e478g5ba3898a087753fa@mail.gmail.com> Message-ID: <6037b70c0908211835g524c8d5bya85a63f9eae6d666@mail.gmail.com> Hi, >> If a function returns DWORD type, the return value cannot be -1. -1 is >> human readable value. It is actually 0xFFFFFFFF. > > Alright, then I should probably change INVALID_HANDLE_VALUE to > 0xFFFFFFFF, and revert 'L' to an unsigned long. I think there are a > handful of other -1 values that should be changed then, too, in > windows-pr. FYI, here are the current values set to -1 in windows-pr that may need to be changed: C:\Documents and Settings\djberge\workspace\windows-pr\lib\windows>findstr /s /c:"-1$" /r *.rb com\variant.rb: VARIANT_TRUE = -1 com.rb: DISPID_UNKNOWN = -1 file.rb: MAILSLOT_NO_MESSAGE = -1 file.rb: MAILSLOT_WAIT_FOREVER = -1 file.rb: INVALID_FILE_ATTRIBUTES = -1 file.rb: INVALID_HANDLE_VALUE = -1 file.rb: INVALID_SET_FILE_POINTER = -1 handle.rb: INVALID_HANDLE_VALUE = -1 mailslot.rb: MAILSLOT_WAIT_FOREVER = -1 mailslot.rb: MAILSLOT_NO_MESSAGE = -1 network\management.rb: MAX_PREFERRED_LENGTH = -1 thread.rb: THREAD_PRIORITY_BELOW_NORMAL = -1 Regards, Dan From djberg96 at gmail.com Sat Aug 22 11:38:26 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Sat, 22 Aug 2009 09:38:26 -0600 Subject: [Win32utils-devel] Batch file trick Message-ID: <4A9010F2.9030006@gmail.com> Courtesy of reddit: http://www.halotis.com/2009/08/21/running-python-code-in-windows-batch-file-trick/ Maybe I'm late to the party, though... Regards, Dan From djberg96 at gmail.com Mon Aug 24 00:24:36 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Sun, 23 Aug 2009 22:24:36 -0600 Subject: [Win32utils-devel] Input values, -1 vs 0xFFFFFFFF Message-ID: <4A921604.10805@gmail.com> Hi, Is there any function where an input of value of 0xffffffff could not be used instead of -1? I can't find one, but I wanted to make sure before I change them all in windows-pr. Regards, Dan PS - We're going back to returning unsigned longs with win32-api for 'L', and using 0xffffffff instead of -1 in windows-pr. From djberg96 at gmail.com Tue Aug 25 00:21:53 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Mon, 24 Aug 2009 22:21:53 -0600 Subject: [Win32utils-devel] win32-api 1.4.5, reversion Message-ID: <004a01ca253b$94bad1d0$be307570$@com> All, I released win32-api 1.4.5 today, which basically just backed out the change in 1.4.4 because it turns out that we do need unsigned longs in some cases after call (for ole, mainly). Instead, I've updated and released windows-pr 1.0.8, where some return values that were previously set to -1 are now set to 0xFFFFFFFF. I went through and re-tested the other win32-libraries. The only bug that resulted that I could find was the File.directory? method in the win32-file library, where I had hard coded a check against -1. I released a fix for that today as well (win32-file 0.6.3). Otherwise, everything seems to be fine. Please let me know if you find any other problems as soon as possible. I think, for now, we're ok. Regards, Dan From djberg96 at gmail.com Tue Aug 25 19:32:44 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Tue, 25 Aug 2009 17:32:44 -0600 Subject: [Win32utils-devel] File.exists?("A:") on Windows VM In-Reply-To: <4A8ED26F.6070003@gmail.com> References: <4A8ED26F.6070003@gmail.com> Message-ID: <6037b70c0908251632w6a127dedwdc66d49da08644ca@mail.gmail.com> On Fri, Aug 21, 2009 at 10:59 AM, Daniel Berger wrote: > Hi, > > I've got a Windows XP VM on my OS X box. Whenever I call File.exists?("A:") > on it I get a system error pop-up box from Windows. > > The title of the window is "Windows - No Disk" and the error is "Exception > Processing Message" followed by some numeric codes. > > It's not a huge deal - eventually control returns to the program and it > returns false as expected once you click on "continue" a couple of times - > but I was hoping to see this pop-up at all, as it kinda mucks up the > win32-file test suite. > > Note that I don't see this behavior on a 'regular' windows install. Just the > VM. > > Any suggestions as to how to best handle this in a test suite? I used SetErrorMode(SEM_FAILCRITICALERRORS) and that seemed to work. Regards, Dan From djberg96 at gmail.com Tue Aug 25 19:34:04 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Tue, 25 Aug 2009 17:34:04 -0600 Subject: [Win32utils-devel] [Fwd: Re: FW: win32-api, unsigned long vs long in api_call] In-Reply-To: <6037b70c0908211835g524c8d5bya85a63f9eae6d666@mail.gmail.com> References: <4A8F4397.9040100@gmail.com> <6037b70c0908211829jd7e478g5ba3898a087753fa@mail.gmail.com> <6037b70c0908211835g524c8d5bya85a63f9eae6d666@mail.gmail.com> Message-ID: <6037b70c0908251634v3a8abfd4qacca922c34c4a298@mail.gmail.com> On Fri, Aug 21, 2009 at 7:35 PM, Daniel Berger wrote: > Hi, > > > >>> If a function returns DWORD type, the return value cannot be -1. -1 is >>> human readable value. It is actually 0xFFFFFFFF. >> >> Alright, then I should probably change INVALID_HANDLE_VALUE to >> 0xFFFFFFFF, and revert 'L' to an unsigned long. I think there are a >> handful of other -1 values that should be changed then, too, in >> windows-pr. > > FYI, here are the current values set to -1 in windows-pr that may need > to be changed: > > C:\Documents and > Settings\djberge\workspace\windows-pr\lib\windows>findstr /s /c:"-1$" > /r *.rb > com\variant.rb: ? ? ? ? VARIANT_TRUE ?= -1 > com.rb: ? ? ?DISPID_UNKNOWN ? ? = -1 > file.rb: ? ? ?MAILSLOT_NO_MESSAGE ? ? ? ? ? ?= -1 > file.rb: ? ? ?MAILSLOT_WAIT_FOREVER ? ? ? ? ?= -1 > file.rb: ? ? ?INVALID_FILE_ATTRIBUTES ?= -1 > file.rb: ? ? ?INVALID_HANDLE_VALUE ? ? = -1 > file.rb: ? ? ?INVALID_SET_FILE_POINTER = -1 > handle.rb: ? ? ?INVALID_HANDLE_VALUE ? ? ? ? ? = -1 > mailslot.rb: ? ? ?MAILSLOT_WAIT_FOREVER = -1 > mailslot.rb: ? ? ?MAILSLOT_NO_MESSAGE ? = -1 > network\management.rb: ? ? ? ? MAX_PREFERRED_LENGTH = -1 > thread.rb: ? ? ?THREAD_PRIORITY_BELOW_NORMAL ?= -1 Most of these were changed in windows-pr 1.0.8. A couple of them were not modified, e.g. THREAD_PRIORITY_BELOW_NORMAL since it's a valid input value. Regards, Dan From noreply at rubyforge.org Sun Aug 30 22:23:19 2009 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sun, 30 Aug 2009 22:23:19 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-26988 ] Process.create needs to explicitly make individual handles inheritable Message-ID: <20090831022319.433C51978285@rubyforge.org> Bugs item #26988, was opened at 2009-08-24 12:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=26988&group_id=85 Category: win32-process Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Michael Buselli (cosine) Assigned to: Nobody (None) Summary: Process.create needs to explicitly make individual handles inheritable Initial Comment: I've encountered some versions of Ruby on Windows (in my particular case Ruby 1.9.1 compiled with MinGW) where IO.pipe does not create inheritable handles. This causes problems when Process.create is used to create a pipe to a child process. The attached patch to win32-process works around this issue by always explicitly calling SetHandleInformation to make the passed handles inheritable. ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2009-08-30 19:23 Message: Hi, Can't you just explicitly set the :process_inherit option to true and get the same effect? Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=26988&group_id=85 From noreply at rubyforge.org Mon Aug 24 15:01:16 2009 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 24 Aug 2009 15:01:16 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-26988 ] Process.create needs to explicitly make individual handles inheritable Message-ID: <20090824190116.9BE213C8031@rubyforge.org> Bugs item #26988, was opened at 2009-08-24 14:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=26988&group_id=85 Category: win32-process Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Michael Buselli (cosine) Assigned to: Nobody (None) Summary: Process.create needs to explicitly make individual handles inheritable Initial Comment: I've encountered some versions of Ruby on Windows (in my particular case Ruby 1.9.1 compiled with MinGW) where IO.pipe does not create inheritable handles. This causes problems when Process.create is used to create a pipe to a child process. The attached patch to win32-process works around this issue by always explicitly calling SetHandleInformation to make the passed handles inheritable. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=26988&group_id=85