delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2018/12/21/02:33:31

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; q=dns; s=default; b=HdQ
oZivFgF7GIHStn+fqPfKHZV9Nnuj2UeekDlEOVR59+MWCKiHOLqNqmMsXJ8EayZ3
nH2NnS5G1v8Fzgbquaytsj78DopQHGev9delFpB9UF0hIFj5Ed+w6MoGLJBv37wi
Uw8RfMVnsyrXAEJ9lmebQToFc7i110lrO5maC9Lg=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:content-type:content-transfer-encoding; s=default; bh=hc6ZaXWmL
01q8NRboYB/aBynN2M=; b=KEhOupNytmisPnz3VNaourUQxbO37B1pnzPWS17UE
NIfXN02OuI5tTZaBMDvjjNHto68gGBf9bTLz55KzvO+zFEzTVhn/gSeag7dcI4UU
2s0q3RbMjfLEbRRRSI9BHSAvaAApo5pV6hu1VU8Rbey3R0ZotfnYxLzmcdSKeJb2
N8=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=ham version=3.3.2 spammy=linda, Linda, H*r:192.168.3, H*F:U*cygwin
X-HELO: Ishtar.sc.tlinx.org
Message-ID: <5C1C973B.7050509@tlinx.org>
Date: Thu, 20 Dec 2018 23:33:15 -0800
From: L A Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: how is cygstart different from cmd /c or how to have cygstart start 'inline'?
X-IsSubscribed: yes

Got a program that starts under cygstart, but I'd
like to be able to start it without starting up the program
in a new window..so was trying cmd /c.

I compared env's and noted both PATH and TMP had been
converted back to the backslash using case, so I
did that manually:

if ((usecmd)); then
    export TMP=$(cygpath -w $TMP)
    my newpath=""
    my sep=""
    readarray -t pathar < <(echo -E "$PATH"|tr ":" "\n")
    for p in "${pathar[@]}"; do
        n=$(cygpath -w "$p")
        newpath="$newpath$sep$n"
        #echo -E "newpath=$newpath"
        sep=";"
    done
    export Path=$newpath
fi

But no luck in launching (cygstart case works):

cd "$ldir" && {
    if ((usecmd)); then
        'c:/windows/system32/cmd.exe' /c "$lpath" "${args[@]}"
    else
        cygstart "$lpath" "${args[@]}"
    fi
}


So what else does cygstart do that I might setup
before a "cmd /c"
to get the target to run?

Or anyway to have cygstart run the command with its output in the
current window?

Thanks!
Linda


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019