# Win32/process problem

**URL:** <https://www.ruby-forum.com/t/win32-process-problem/122209>\
**Category:** Ruby\
**Created:** [December 5, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/win32-process-problem/122209 "2007-12-05T16:28:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sealedsun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Post date:** [December 5, 2007, 4:28pm UTC](https://www.ruby-forum.com/t/win32-process-problem/122209/1 "2007-12-05T16:28:21Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![sealedsun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Post date:** [December 5, 2007, 5:45pm UTC](https://www.ruby-forum.com/t/win32-process-problem/122209/2 "2007-12-05T17:45:18Z")

</div>

On Dec 5, 8:28 am, Christian K. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> 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

---

<div class="post-metadata">

**Author:** ![sealedsun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Post date:** [December 6, 2007, 7:59am UTC](https://www.ruby-forum.com/t/win32-process-problem/122209/3 "2007-12-06T07:59:00Z")

</div>

Daniel B. 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: #

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

---

<div class="post-metadata">

**Author:** ![sealedsun](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/e68b1a/32.png) [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Post date:** [December 6, 2007, 12:47pm UTC](https://www.ruby-forum.com/t/win32-process-problem/122209/4 "2007-12-06T12:47:38Z")

</div>

Christian K. wrote:

> Daniel B. 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: #
> 
> 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
