From noreply at rubyforge.org Thu May 3 12:48:11 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 3 May 2007 12:48:11 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-10555 ] wait call in while loop generate "bignum too big to convert into long" error Message-ID: <20070503164811.4AAAE5240B16@rubyforge.org> Bugs item #10555, was opened at 2007-05-03 11:48 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10555&group_id=85 Category: win32-changejournal Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Dong Zhang (dzhang) Assigned to: Park Heesob (phasis68) Summary: wait call in while loop generate "bignum too big to convert into long" error Initial Comment: I put the following in a test.rb file. This code comes with the source of Changejournal. ************************************************** require "win32/changejournal" include Win32 # Indefinitely wait for a change in 'C:\' and any of its # subdirectories. Print the file and action affected. cj = ChangeJournal.new('C:\') # A ChangeJournal server :) cj.wait{ |array| array.each{ |info| p info.file_name p info.action p info.path } } while true ********************************************** the script will run for a while, then quit with the following error test.rb:10:in `wait': bignum too big to convert into `long long' (RangeError) from test.rb:10 my pc is XP, sp2, with ruby 1.8.5 (2006-12-25 patchlevel 12) I downloaded the changejournal-0.3.1.so file, renamed it changejournal.so, and drop it in C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt\win32. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10555&group_id=85 From Daniel.Berger at qwest.com Fri May 4 10:57:03 2007 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Fri, 4 May 2007 09:57:03 -0500 Subject: [Win32utils-devel] Trying to get a good example for win32-mutex Message-ID: <7524A45A1A5B264FA4809E2156496CFBE72C0E@ITOMAE2KM01.AD.QINTRA.COM> Hi all, I've been going through the various IPC modules for Win32Utils and converting them to pure Ruby. I'm almost done with win32-mutex, but I can't get the example to work. I keep getting this error: C:/Documents and Settings/djberge/workspace/win32-mutex/examples/mutex_test.rb:41: undefined method `+' for nil:NilClass (NoMethodError) from C:/Documents and Settings/djberge/workspace/win32-mutex/examples/mutex_test.rb:38:in `times' from C:/Documents and Settings/djberge/workspace/win32-mutex/examples/mutex_test.rb:38 Here's the updated mutex_test.rb file. I'm using the win32/mutex.rb file in CVS, win32-mmap 0.2.1 and win32-process 0.5.2: ############################################################## # mutex_test.rb # # A test script for general futzing. Modify as you see fit. # This test script requires win32-process and win32-mmap. ############################################################## MUTEXNAME = "This is a very long name" require 'win32/mutex' require 'win32/process' require 'win32/mmap' include Win32 pid = Process.fork # child_1 if pid.nil? mm = MMap.open('test') mx = Win32::Mutex.open(MUTEXNAME) 5.times{ mx.wait puts "child_1 wait " mm.gvalue += 123 sleep 1 mm.gvalue -= 123 mx.release puts "child_1 release " } exit 1 end pid2 = Process.fork # child_2 if pid2.nil? mm = MMap.open('test') mx = Win32::Mutex.open(MUTEXNAME) 4.times{ mx.wait puts "child_2 wait " mm.gvalue += 456 sleep 2 mm.gvalue -= 456 mx.release puts "child_2 release " } exit 1 end #parent mm = MMap.new(:size => 1024, :name => 'test', :inherit => true) mm.gvalue = 0 mx = Win32::Mutex.new(true, MUTEXNAME) # named mutex object 3.times{ mx.wait puts "parent wait" sleep 5 printf("Value of GValue=%d\n", mm.gvalue) mx.release puts "parent release" } p Process.waitpid2(pid) p Process.waitpid2(pid2) It looks like the MMap.open('test') is working fine, but it's not picking up the gvalue set in the parent for some reason. Any ideas? Thanks, Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From Daniel.Berger at qwest.com Fri May 4 11:08:18 2007 From: Daniel.Berger at qwest.com (Berger, Daniel) Date: Fri, 4 May 2007 10:08:18 -0500 Subject: [Win32utils-devel] Trying to get a good example for win32-mutex In-Reply-To: <7524A45A1A5B264FA4809E2156496CFBE72C0E@ITOMAE2KM01.AD.QINTRA.COM> Message-ID: <7524A45A1A5B264FA4809E2156496CFBE72C0F@ITOMAE2KM01.AD.QINTRA.COM> > -----Original Message----- > From: win32utils-devel-bounces at rubyforge.org > [mailto:win32utils-devel-bounces at rubyforge.org] On Behalf Of > Berger, Daniel > Sent: Friday, May 04, 2007 8:57 AM > To: Development and ideas for win32utils projects > Subject: [Win32utils-devel] Trying to get a good example for > win32-mutex > > > Hi all, > > I've been going through the various IPC modules for > Win32Utils and converting them to pure Ruby. I'm almost done > with win32-mutex, but I can't get the example to work. I > keep getting this error: > > C:/Documents and > Settings/djberge/workspace/win32-mutex/examples/mutex_test.rb:41: > undefined method `+' for nil:NilClass > (NoMethodError) > from C:/Documents and > Settings/djberge/workspace/win32-mutex/examples/mutex_test.rb:38:in > `times' > from C:/Documents and > Settings/djberge/workspace/win32-mutex/examples/mutex_test.rb:38 > > Here's the updated mutex_test.rb file. I'm using the > win32/mutex.rb file in CVS, win32-mmap 0.2.1 and win32-process 0.5.2: Further review indicates that the problem is setting attributes to a value of zero. I fired up two irb sessions, creating an mmap in one and opening it in the other. When I do "mm.gvalue = 5", everything works alright. However, if I set it to 0, I start getting: ArgumentError: marshal data too short from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load' from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing' from (irb):7 So, looks like a bug in win32-mmap. Disregard. Dan This communication is the property of Qwest and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments. From noreply at rubyforge.org Fri May 4 15:01:32 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 4 May 2007 15:01:32 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap Message-ID: <20070504190133.2F1DB5240A79@rubyforge.org> Bugs item #10589, was opened at 2007-05-04 12:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require 'win32/mmap' include Win32 mm = MMap.new(:size => 1024, :name => 'test') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing' from mmap_test.rb:6 ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 From noreply at rubyforge.org Fri May 4 17:17:46 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 4 May 2007 17:17:46 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Patches-6236 ] Add debug API Message-ID: <20070504211746.52DAC5240989@rubyforge.org> Patches item #6236, was opened at 2006-10-19 07:10 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6236&group_id=85 >Category: windows-pr Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jano Svitok (janek) >Assigned to: Daniel Berger (djberg96) Summary: Add debug API Initial Comment: This adds couple of methods to interface with debugger (WinDbg, MS VC, etc.) ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2007-05-04 14:17 Message: I'll eventually add these as part of the windows-pr package. I'm thinking Windows::Debug. Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6236&group_id=85 From noreply at rubyforge.org Fri May 4 17:18:30 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 4 May 2007 17:18:30 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Patches-6237 ] Add Guid API Message-ID: <20070504211830.361625240989@rubyforge.org> Patches item #6237, was opened at 2006-10-19 07:11 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6237&group_id=85 >Category: windows-pr Group: None Status: Open Resolution: None Priority: 3 Submitted By: Jano Svitok (janek) >Assigned to: Daniel Berger (djberg96) Summary: Add Guid API Initial Comment: This adds API for creating GUIDs. ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2007-05-04 14:18 Message: As with the debug patch you proposed, I'll add these as part of a eventual Windows::COM module, in the windows-pr package. Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6237&group_id=85 From noreply at rubyforge.org Fri May 4 17:19:13 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 4 May 2007 17:19:13 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Feature Requests-5855 ] gems for every package Message-ID: <20070504211913.5E7DC5240989@rubyforge.org> Feature Requests item #5855, was opened at 2006-09-22 08:42 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=5855&group_id=85 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Ivan Muzzolini (imuzzolini) Assigned to: Nobody (None) Summary: gems for every package Initial Comment: Why not having a gem for every package? Thanks! Bye! Ivan ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2007-05-04 14:19 Message: We're getting closer! There are now gems for win32-ipc, win32-event, win32-semaphore and win32-mutex. Dan ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2006-09-23 15:35 Message: We're working on it! The C extensions are proving to be a pain. I'm not sure if it's a bug in gems or what, because building and installing gems locally works fine, but when I pull them remotely they fail. That's why you've only seen gems for the pure Ruby stuff so far. Thanks, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=5855&group_id=85 From noreply at rubyforge.org Fri May 4 17:20:33 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 4 May 2007 17:20:33 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Feature Requests-1435 ] Move native IO routines to the IO class Message-ID: <20070504212033.5458E5240989@rubyforge.org> Feature Requests item #1435, was opened at 2005-02-03 12:19 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=1435&group_id=85 Category: win32-file Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Move native IO routines to the IO class Initial Comment: The nread and nwrite methods to the IO class, instead of the File class. Also, create class methods for each. ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2007-05-04 14:20 Message: Update: the nread and nwrite methods were removed from the pure Ruby win32-file class, but I have not yet released a win32-io package. Dan (me) ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=1435&group_id=85 From noreply at rubyforge.org Fri May 4 17:21:23 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 4 May 2007 17:21:23 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Feature Requests-1316 ] Support for Win32 Remote Access API Message-ID: <20070504212124.03C1E5240ABB@rubyforge.org> Feature Requests item #1316, was opened at 2005-01-10 10:07 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=1316&group_id=85 Category: Interface Improvements (example) Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Nobody (None) >Assigned to: Nobody (None) Summary: Support for Win32 Remote Access API Initial Comment: I am sure that this future will be very useful for many people. The example of implementation for win32ras you can find here http://www.python.org/windows/win32/#win32ras ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2007-05-04 14:21 Message: On third thought, I simply do not have the time for this. Contributors welcome. Regards, Dan ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2005-01-12 17:29 Message: Logged In: YES user_id=109 On second thought, the API looks easy. I'll do it. :) ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2005-01-12 13:03 Message: Logged In: YES user_id=109 This is a good idea - thanks for the suggestion. Now I need someone to implement it. I may have to canvas for Win32 developers if Park isn't interested. Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=414&aid=1316&group_id=85 From noreply at rubyforge.org Fri May 4 23:53:18 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Fri, 4 May 2007 23:53:18 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-10555 ] wait call in while loop generate "bignum too big to convert into long" error Message-ID: <20070505035318.4E34C5240BB3@rubyforge.org> Bugs item #10555, was opened at 2007-05-04 01:48 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10555&group_id=85 Category: win32-changejournal Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Dong Zhang (dzhang) Assigned to: Park Heesob (phasis68) >Summary: wait call in while loop generate "bignum too big to convert into long" error Initial Comment: I put the following in a test.rb file. This code comes with the source of Changejournal. ************************************************** require "win32/changejournal" include Win32 # Indefinitely wait for a change in 'C:\' and any of its # subdirectories. Print the file and action affected. cj = ChangeJournal.new('C:\') # A ChangeJournal server :) cj.wait{ |array| array.each{ |info| p info.file_name p info.action p info.path } } while true ********************************************** the script will run for a while, then quit with the following error test.rb:10:in `wait': bignum too big to convert into `long long' (RangeError) from test.rb:10 my pc is XP, sp2, with ruby 1.8.5 (2006-12-25 patchlevel 12) I downloaded the changejournal-0.3.1.so file, renamed it changejournal.so, and drop it in C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt\win32. ---------------------------------------------------------------------- >Comment By: Park Heesob (phasis68) Date: 2007-05-05 12:53 Message: I guess the macro NUM2LL should be NUM2ULL in changejournal.h. Regards, Park Heesob ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10555&group_id=85 From noreply at rubyforge.org Mon May 7 23:47:36 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Mon, 7 May 2007 23:47:36 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap Message-ID: <20070508034736.B1E035240C2F@rubyforge.org> Bugs item #10589, was opened at 2007-05-04 12:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require 'win32/mmap' include Win32 mm = MMap.new(:size => 1024, :name => 'test') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing' from mmap_test.rb:6 ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2007-05-07 20:47 Message: (FYI to myself) This is caused by memcpy() truncating marshalled data that ends with "\000" because it treats it as a null. One solution might be to use wmemcpy() instead, but I'm not sure how to get at that function, since msvcrt doesn't appear to export it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 From noreply at rubyforge.org Thu May 10 11:57:22 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Thu, 10 May 2007 11:57:22 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap Message-ID: <20070510155722.2586C52409FF@rubyforge.org> Bugs item #10589, was opened at 2007-05-05 04:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require 'win32/mmap' include Win32 mm = MMap.new(:size => 1024, :name => 'test') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing' from mmap_test.rb:6 ---------------------------------------------------------------------- >Comment By: Park Heesob (phasis68) Date: 2007-05-11 00:57 Message: It's because the return type of the MemcpyXXX is 'P'. Quick and dirty solution is like this: marshal = memcpy(buf, @address, @size) + "\0" Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-08 12:47 Message: (FYI to myself) This is caused by memcpy() truncating marshalled data that ends with "\000" because it treats it as a null. One solution might be to use wmemcpy() instead, but I'm not sure how to get at that function, since msvcrt doesn't appear to export it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 From noreply at rubyforge.org Wed May 16 03:58:43 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 16 May 2007 03:58:43 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap Message-ID: <20070516075843.316D15240C21@rubyforge.org> Bugs item #10589, was opened at 2007-05-04 12:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require 'win32/mmap' include Win32 mm = MMap.new(:size => 1024, :name => 'test') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing' from mmap_test.rb:6 ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2007-05-16 00:58 Message: I added the explicit "\0" in CVS, but then I noticed that it fails elsewhere: mm = Win32::MMap.new(:size => 24, :name => 'test') mm.bar = 7 mm.baz = 0 p mm.bar # Boom! p mm.baz mm.close mmap.rb:336:in `load': marshal data too short (ArgumentError) from mmap.rb:336:in `method_missing' from mmap.rb:399 ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 2007-05-10 08:57 Message: It's because the return type of the MemcpyXXX is 'P'. Quick and dirty solution is like this: marshal = memcpy(buf, @address, @size) + "\0" Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-07 20:47 Message: (FYI to myself) This is caused by memcpy() truncating marshalled data that ends with "\000" because it treats it as a null. One solution might be to use wmemcpy() instead, but I'm not sure how to get at that function, since msvcrt doesn't appear to export it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 From noreply at rubyforge.org Wed May 16 09:04:11 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 16 May 2007 09:04:11 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Patches-6236 ] Add debug API Message-ID: <20070516130411.DE572A970004@rubyforge.org> Patches item #6236, was opened at 2006-10-19 07:10 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6236&group_id=85 Category: windows-pr Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Jano Svitok (janek) Assigned to: Daniel Berger (djberg96) Summary: Add debug API Initial Comment: This adds couple of methods to interface with debugger (WinDbg, MS VC, etc.) ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2007-05-16 06:04 Message: I've committed debug.rb (Windows::Debug) to CVS. It contains all of the debug functions listed along with the ones you provided here, and will be part of the next release. Dan ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-04 14:17 Message: I'll eventually add these as part of the windows-pr package. I'm thinking Windows::Debug. Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6236&group_id=85 From noreply at rubyforge.org Wed May 16 12:03:39 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 16 May 2007 12:03:39 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap Message-ID: <20070516160339.19D1B5240A2F@rubyforge.org> Bugs item #10589, was opened at 2007-05-05 04:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code Status: Open Resolution: None Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require 'win32/mmap' include Win32 mm = MMap.new(:size => 1024, :name => 'test') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing' from mmap_test.rb:6 ---------------------------------------------------------------------- >Comment By: Park Heesob (phasis68) Date: 2007-05-17 01:03 Message: I wish this is the right solution: marshal = memcpy(buf, @address, @size) should be memcpy(buf, @address, @size) marshal = buf Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-16 16:58 Message: I added the explicit "\0" in CVS, but then I noticed that it fails elsewhere: mm = Win32::MMap.new(:size => 24, :name => 'test') mm.bar = 7 mm.baz = 0 p mm.bar # Boom! p mm.baz mm.close mmap.rb:336:in `load': marshal data too short (ArgumentError) from mmap.rb:336:in `method_missing' from mmap.rb:399 ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 2007-05-11 00:57 Message: It's because the return type of the MemcpyXXX is 'P'. Quick and dirty solution is like this: marshal = memcpy(buf, @address, @size) + "\0" Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-08 12:47 Message: (FYI to myself) This is caused by memcpy() truncating marshalled data that ends with "\000" because it treats it as a null. One solution might be to use wmemcpy() instead, but I'm not sure how to get at that function, since msvcrt doesn't appear to export it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 From noreply at rubyforge.org Wed May 16 12:58:31 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Wed, 16 May 2007 12:58:31 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Bugs-10589 ] Bug in win32-mmap Message-ID: <20070516165831.5A1345240A45@rubyforge.org> Bugs item #10589, was opened at 2007-05-04 12:01 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 Category: win32-mmap Group: Code >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Daniel Berger (djberg96) Assigned to: Daniel Berger (djberg96) Summary: Bug in win32-mmap Initial Comment: Ruby 1.8.6 win32-mmap 0.2.1 Assigning the value 0 to a dynamic setter causes the corresponding getter to fail. This small script demonstrates the problem: require 'win32/mmap' include Win32 mm = MMap.new(:size => 1024, :name => 'test') mm.gvalue = 0 p mm.gvalue mm.close The result is: C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `load': marshal data too short (ArgumentError) from C:/ruby/lib/ruby/gems/1.8/gems/win32-mmap-0.2.0/lib/win32/mmap.rb:335:in `method_missing' from mmap_test.rb:6 ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2007-05-16 09:58 Message: Thanks, that was it! Dan ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 2007-05-16 09:03 Message: I wish this is the right solution: marshal = memcpy(buf, @address, @size) should be memcpy(buf, @address, @size) marshal = buf Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-16 00:58 Message: I added the explicit "\0" in CVS, but then I noticed that it fails elsewhere: mm = Win32::MMap.new(:size => 24, :name => 'test') mm.bar = 7 mm.baz = 0 p mm.bar # Boom! p mm.baz mm.close mmap.rb:336:in `load': marshal data too short (ArgumentError) from mmap.rb:336:in `method_missing' from mmap.rb:399 ---------------------------------------------------------------------- Comment By: Park Heesob (phasis68) Date: 2007-05-10 08:57 Message: It's because the return type of the MemcpyXXX is 'P'. Quick and dirty solution is like this: marshal = memcpy(buf, @address, @size) + "\0" Regards, Park Heesob ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-07 20:47 Message: (FYI to myself) This is caused by memcpy() truncating marshalled data that ends with "\000" because it treats it as a null. One solution might be to use wmemcpy() instead, but I'm not sure how to get at that function, since msvcrt doesn't appear to export it. ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=10589&group_id=85 From noreply at rubyforge.org Sat May 26 23:31:48 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 26 May 2007 23:31:48 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Patches-6237 ] Add Guid API Message-ID: <20070527033148.5977A5240B91@rubyforge.org> Patches item #6237, was opened at 2006-10-19 07:11 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6237&group_id=85 Category: windows-pr Group: None >Status: Closed >Resolution: Accepted Priority: 3 Submitted By: Jano Svitok (janek) Assigned to: Daniel Berger (djberg96) Summary: Add Guid API Initial Comment: This adds API for creating GUIDs. ---------------------------------------------------------------------- >Comment By: Daniel Berger (djberg96) Date: 2007-05-26 20:31 Message: These methods, along with many others, are now part of the Windows::COM module in CVS. They'll be part of the 0.7.0 release. Regards, Dan ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-05-04 14:18 Message: As with the debug patch you proposed, I'll add these as part of a eventual Windows::COM module, in the windows-pr package. Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=413&aid=6237&group_id=85 From noreply at rubyforge.org Sat May 26 23:33:31 2007 From: noreply at rubyforge.org (noreply at rubyforge.org) Date: Sat, 26 May 2007 23:33:31 -0400 (EDT) Subject: [Win32utils-devel] [ win32utils-Support Requests-8957 ] Killing grandchildren? Message-ID: <20070527033332.0531E5240B91@rubyforge.org> Support Requests item #8957, was opened at 2007-02-28 13:47 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=412&aid=8957&group_id=85 Category: win32-process Group: None >Status: Closed >Resolution: Rejected Priority: 3 Submitted By: Chad Woolley (thewoolleyman) Assigned to: Nobody (None) Summary: Killing grandchildren? Initial Comment: I am trying to spawn, then kill, a gem_server process. On windows, however, this actually spawns a child cmd instance for the gem_installer.bat file, which then spawns a grandchild ruby process for the gem_server command. I can't figure out how to make the grandchild process die. If I could get it's PID, I could kill it, but I only have the pid of the child process. If I kill the child, then the grandchild is not killed, but stays alive, and is owned by the top-level cmd shell process. Here's the file where I am trying to do this: http://rubyforge.org/viewvc/trunk/spec/helper/embedded_gem_server.rb?revision=353&root=geminstaller&view=markup Thanks, Chad ---------------------------------------------------------------------- Comment By: Daniel Berger (djberg96) Date: 2007-02-28 18:36 Message: There's just no way to do that as far as I know, because of the way the Windows process model works, i.e. Processes know about their children but not their grandchildren. However, since it appears that you're trying to daemonize a gem_server, I recommed using the ruby-services package. It has services for gems, webrick and fastri. Install the gem service, and control it that way instead. It's what I do. Regards, Dan ---------------------------------------------------------------------- You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=412&aid=8957&group_id=85