Backticks failing in Ruby built with VC++ 8

Discussion in 'Ruby' started by Daniel Berger, Jan 28, 2007.

  1. 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
    Daniel Berger, Jan 28, 2007
    #1
    1. Advertising

  2. Daniel Berger

    Eric Hodel Guest

    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://blog.segment7.net

    I LIT YOUR GEM ON FIRE!
    Eric Hodel, Jan 28, 2007
    #2
    1. Advertising

  3. 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
    Daniel Berger, Jan 28, 2007
    #3
  4. 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
    Nobuyoshi Nakada, Jan 28, 2007
    #4
  5. 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
    Daniel Berger, Jan 28, 2007
    #5
  6. Daniel Berger

    Eric Hodel Guest

    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 - - http://blog.segment7.net

    I LIT YOUR GEM ON FIRE!
    Eric Hodel, Jan 28, 2007
    #6
  7. 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
    Daniel Berger, Jan 28, 2007
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kristina Clair
    Replies:
    0
    Views:
    665
    Kristina Clair
    Aug 27, 2004
  2. Steven Brent

    Backticks: What up?

    Steven Brent, Apr 28, 2004, in forum: Python
    Replies:
    6
    Views:
    336
    Steve Holden
    Apr 28, 2004
  3. Sam Stephenson
    Replies:
    9
    Views:
    228
    Caleb Clausen
    Nov 7, 2005
  4. Chris McMahon
    Replies:
    2
    Views:
    204
    David Vallner
    Oct 19, 2006
  5. Giles Bowkett

    backticks asynchronous?

    Giles Bowkett, Nov 19, 2006, in forum: Ruby
    Replies:
    4
    Views:
    84
    Giles Bowkett
    Nov 20, 2006
Loading...

Share This Page