Web lists-archives.com

how is cygstart different from cmd /c or how to have cygstart start 'inline'?




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