Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Backticks failing in Ruby built with VC++ 8

Reply
Thread Tools

Backticks failing in Ruby built with VC++ 8

 
 
Daniel Berger
Guest
Posts: n/a
 
      01-28-2007
Hi all,

Ruby 1.8.5 p12
Windows XP SP2

I'm getting a segfault when I use the backtick operator in a Ruby built
with VC++ 8:

pwd = `pwd`.chomp

It works fine with the one click (VC++ 6).

Is anyone else seeing this behavior? I want to make sure I haven't done
something silly before officially filing this as a bug report. If it is
a bug, I'm guessing I need to examine the CreateChild function in Ruby's
win32.c file. Please point me to the appropriate location if that's not
correct.

Thanks,

Dan

 
Reply With Quote
 
 
 
 
Eric Hodel
Guest
Posts: n/a
 
      01-28-2007
On Jan 27, 2007, at 19:55, Daniel Berger wrote:
> Hi all,
>
> Ruby 1.8.5 p12
> Windows XP SP2
>
> I'm getting a segfault when I use the backtick operator in a Ruby
> built with VC++ 8:
>
> pwd = `pwd`.chomp
>
> It works fine with the one click (VC++ 6).
>
> Is anyone else seeing this behavior? I want to make sure I haven't
> done something silly before officially filing this as a bug
> report. If it is a bug, I'm guessing I need to examine the
> CreateChild function in Ruby's win32.c file. Please point me to the
> appropriate location if that's not correct.


Isn't pwd a shell builtin on WinXP?

--
Eric Hodel - http://www.velocityreviews.com/forums/(E-Mail Removed) - http://blog.segment7.net

I LIT YOUR GEM ON FIRE!


 
Reply With Quote
 
 
 
 
Daniel Berger
Guest
Posts: n/a
 
      01-28-2007
Eric Hodel wrote:
> On Jan 27, 2007, at 19:55, Daniel Berger wrote:
>> Hi all,
>>
>> Ruby 1.8.5 p12
>> Windows XP SP2
>>
>> I'm getting a segfault when I use the backtick operator in a Ruby
>> built with VC++ 8:
>>
>> pwd = `pwd`.chomp
>>
>> It works fine with the one click (VC++ 6).
>>
>> Is anyone else seeing this behavior? I want to make sure I haven't
>> done something silly before officially filing this as a bug report.
>> If it is a bug, I'm guessing I need to examine the CreateChild
>> function in Ruby's win32.c file. Please point me to the appropriate
>> location if that's not correct.

>
> Isn't pwd a shell builtin on WinXP?

Yes. Is that significant?

Dan

 
Reply With Quote
 
Nobuyoshi Nakada
Guest
Posts: n/a
 
      01-28-2007
Hi,

At Sun, 28 Jan 2007 13:14:14 +0900,
Daniel Berger wrote in [ruby-talk:236504]:
> > Isn't pwd a shell builtin on WinXP?

> Yes. Is that significant?


Really?

C:\Documents and Settings\nobu>us
Active code page: 437
C:\Documents and Settings\nobu>ver

Microsoft Windows XP [Version 5.1.2600]

C:\Documents and Settings\nobu>pwd
'pwd' is not recognized as an internal or external command,
operable program or batch file.

--
Nobu Nakada

 
Reply With Quote
 
Daniel Berger
Guest
Posts: n/a
 
      01-28-2007
Nobuyoshi Nakada wrote:
> Hi,
>
> At Sun, 28 Jan 2007 13:14:14 +0900,
> Daniel Berger wrote in [ruby-talk:236504]:
>>> Isn't pwd a shell builtin on WinXP?

>> Yes. Is that significant?

>
> Really?
>
> C:\Documents and Settings\nobu>us
> Active code page: 437
> C:\Documents and Settings\nobu>ver
>
> Microsoft Windows XP [Version 5.1.2600]
>
> C:\Documents and Settings\nobu>pwd
> 'pwd' is not recognized as an internal or external command,
> operable program or batch file.
>


Oh, you're right (I got it from Unix Utils). But, it doesn't matter. It
happens with any command. I tried 'dir', 'path', etc.

Regards,

Dan

 
Reply With Quote
 
Eric Hodel
Guest
Posts: n/a
 
      01-28-2007
On Jan 27, 2007, at 20:14, Daniel Berger wrote:
> Eric Hodel wrote:
>> On Jan 27, 2007, at 19:55, Daniel Berger wrote:
>>> Hi all,
>>>
>>> Ruby 1.8.5 p12
>>> Windows XP SP2
>>>
>>> I'm getting a segfault when I use the backtick operator in a Ruby
>>> built with VC++ 8:
>>>
>>> pwd = `pwd`.chomp
>>>
>>> It works fine with the one click (VC++ 6).
>>>
>>> Is anyone else seeing this behavior? I want to make sure I
>>> haven't done something silly before officially filing this as a
>>> bug report. If it is a bug, I'm guessing I need to examine the
>>> CreateChild function in Ruby's win32.c file. Please point me to
>>> the appropriate location if that's not correct.

>>
>> Isn't pwd a shell builtin on WinXP?

> Yes. Is that significant?


It seems to be.

`ruby -v` works for me, but `pwd` doesn't.

--
Eric Hodel - (E-Mail Removed) - http://blog.segment7.net

I LIT YOUR GEM ON FIRE!


 
Reply With Quote
 
Daniel Berger
Guest
Posts: n/a
 
      01-28-2007
Eric Hodel wrote:
> On Jan 27, 2007, at 20:14, Daniel Berger wrote:
>> Eric Hodel wrote:
>>> On Jan 27, 2007, at 19:55, Daniel Berger wrote:
>>>> Hi all,
>>>>
>>>> Ruby 1.8.5 p12
>>>> Windows XP SP2
>>>>
>>>> I'm getting a segfault when I use the backtick operator in a Ruby
>>>> built with VC++ 8:
>>>>
>>>> pwd = `pwd`.chomp
>>>>
>>>> It works fine with the one click (VC++ 6).
>>>>
>>>> Is anyone else seeing this behavior? I want to make sure I haven't
>>>> done something silly before officially filing this as a bug report.
>>>> If it is a bug, I'm guessing I need to examine the CreateChild
>>>> function in Ruby's win32.c file. Please point me to the appropriate
>>>> location if that's not correct.
>>>
>>> Isn't pwd a shell builtin on WinXP?

>> Yes. Is that significant?

>
> It seems to be.
>
> `ruby -v` works for me, but `pwd` doesn't.


As I responded to Nobu, it happens with any command. Besides, 'pwd'
works if you're using the Windows PowerShell.

Dan


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
backticks asynchronous? Giles Bowkett Ruby 4 11-20-2006 04:59 AM
handle a pipe (|) character inside backticks? Chris McMahon Ruby 2 10-19-2006 09:30 PM
Lazy fun: Make unary minus silence stderr for backticks Sam Stephenson Ruby 9 11-07-2005 03:36 PM
taint: system vs. backticks and permissions Kristina Clair Perl 0 08-27-2004 03:54 PM
Backticks: What up? Steven Brent Python 6 04-28-2004 03:40 PM



Advertisments