[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

win32/process problem

Christian Kerth

12/5/2007 3:28:00 PM

I have an application that consists of serveral independent parts.

I want to use the Windows Process API to spawn the different processes.

e.g.

require 'rubygems'
require 'win32/process'

x = Process.create(:app_name => "rubyw learnbase_server.rb")

puts x.process_id

puts a process id, but i get the error: [BUG] Segmentation fault.

Not even x = Process.create(:app_name => "notepad") works. It starts
notepad, but i get the same error.
--
Posted via http://www.ruby-....

3 Answers

Daniel Berger

12/5/2007 4:44:00 PM

0



On Dec 5, 8:28 am, Christian Kerth <christian.ke...@dynamicmedia.at>
wrote:
> I have an application that consists of serveral independent parts.
>
> I want to use the Windows Process API to spawn the different processes.
>
> e.g.
>
> require 'rubygems'
> require 'win32/process'
>
> x = Process.create(:app_name => "rubyw learnbase_server.rb")
>
> puts x.process_id
>
> puts a process id, but i get the error: [BUG] Segmentation fault.
>
> Not even x = Process.create(:app_name => "notepad") works. It starts
> notepad, but i get the same error.

Can you provide more information?

What is the OS, Ruby version and win32-process version?

What result of "p x" ?
x = Process.create(:app_name => "notepad")
p x

Thanks,

Dan

Christian Kerth

12/6/2007 6:59:00 AM

0

Daniel Berger wrote:

> Can you provide more information?
>
> What is the OS, Ruby version and win32-process version?
>
> What result of "p x" ?
> x = Process.create(:app_name => "notepad")
> p x
>
> Thanks,
>
> Dan

OS: Windows XP prof SP2
Ruby: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
Win32: 0.5.4 (updated yesterday)

p x prints: #<struct Struct::ProcessInfo process_handle=8072,
thread_handle=8064, process_id=2804, thread_id=2808>

The funny thing is, i have setup a vmware session with xp prof sp2, ruby
1.8.6 and win32 0.5.4 and it works there.

thx ck
--
Posted via http://www.ruby-....

Christian Kerth

12/6/2007 11:48:00 AM

0

Christian Kerth wrote:
> Daniel Berger wrote:
>
>> Can you provide more information?
>>
>> What is the OS, Ruby version and win32-process version?
>>
>> What result of "p x" ?
>> x = Process.create(:app_name => "notepad")
>> p x
>>
>> Thanks,
>>
>> Dan
>
> OS: Windows XP prof SP2
> Ruby: ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
> Win32: 0.5.4 (updated yesterday)
>
> p x prints: #<struct Struct::ProcessInfo process_handle=8072,
> thread_handle=8064, process_id=2804, thread_id=2808>
>
> The funny thing is, i have setup a vmware session with xp prof sp2, ruby
> 1.8.6 and win32 0.5.4 and it works there.
>
> thx ck

I uninstalled the ruby win32 gem and reinstalled it.

Works now, thanks
--
Posted via http://www.ruby-....