[#9722] Kernel#system broken inside Dir.chdir(&block) if system command doesn't have shell characters — <noreply@...>

Bugs item #7278, was opened at 2006-12-14 13:59

8 messages 2006/12/14

[#9749] System V IPC in standard library? — Steven Jenkins <steven.jenkins@...>

Back in August, I needed a semaphore to serialize access to an external

14 messages 2006/12/19

[#9753] CVS freeze — SASADA Koichi <ko1@...>

Hi,

20 messages 2006/12/20
[#9755] Re: [ruby-dev:30039] CVS freeze — SASADA Koichi <ko1@...> 2006/12/20

Hi,

[#9757] Re: [ruby-dev:30040] Re: CVS freeze — SASADA Koichi <ko1@...> 2006/12/20

Hi,

[ ruby-Bugs-7278 ] Kernel#system broken inside Dir.chdir(&block) if system command doesn't have shell characters

From: <noreply@...>
Date: 2006-12-14 21:59:52 UTC
List: ruby-core #9722
Bugs item #7278, was opened at 2006-12-14 13:59
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=7278&group_id=426

Category: Core
Group: 1.8.x
Status: Open
Resolution: None
Priority: 3
Submitted By: Ryan Davis (zenspider)
Assigned to: Nobody (None)
Summary: Kernel#system broken inside Dir.chdir(&block) if system command doesn't have shell characters

Initial Comment:
I have a series of commands I'm trying to run that'll only work if I'm in the "p4" subdir. But system inside of a chdir is borking unless I add a semicolon to the command. The system/exec logic is overly complex and hurts my brain so I can't debug it:

% ruby -v -e 'Dir.chdir("p4") { system "/usr/local/bin/p4 info" }'
ruby 1.8.5 (2006-08-25) [i686-darwin8.8.1]
Perforce client error:
        Connect to server failed; check $P4PORT.
        TCP connect to perforce failed.
        perforce: host unknown.

% ruby -v -e 'Dir.chdir("p4") { system "/usr/local/bin/p4 info;" }' ### <=== notice the semicolon
ruby 1.8.5 (2006-08-25) [i686-darwin8.8.1]
User name: ryand
Client name: test1
Client host: ewin-mac.limewire.com
Client root: /Users/ryan/mirror/p4
Current directory: /Users/ryan/mirror/p4
Client address: 216.27.158.74:55857
Server address: dsl254-010-137.sea1.dsl.speakeasy.net:1666
Server root: /Volumes/Users/perforce/root
Server date: 2006/12/14 13:57:48 -0800 PST
Server version: P4D/DARWIN60CSPPC/2005.2.case_sensitive/90475 (2006/01/05)
Server license: Ryan Davis/Zen Spider Software 30 users (expires 2007/10/12) 


----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1698&aid=7278&group_id=426

In This Thread

Prev Next