Hmm. I think you're right; I need to give up looking for a robust way to
do this. I think I'll:
if(
(system(uname) looks sane) &&
(system(cygpath -m /bin/sh) returns success))
use CreateProcess with /bin/sh path returned by cygpath;
else
use CreateProcess with cmd.exe /c
And I'
Dave Korn wrote:
Out of curiosity, what's the problem with just using system("...") always?
I can't, because I need to redirect child I/O onto a socket, which
requires CreateProcess. The Unix code is (relatively) easy, but it's a
complete nightmare in Windoze. You have to use pipes as well
Phil Betts wrote:
Just export the variables you want. That's the whole point of the
export command.
They're not my variables. I've written an app which runs on Linux and
"Windows". Most of the time on "Windows", it's probably going to be
running on Cygwin/bash. However, there's always going
Dave Korn wrote:
Out of curiosity, what's the problem with just using popen("...") always?
I get the feeling you're working up to telling me something I don't want
to hear, but I shall carry on regardless... :)
[_]popen is fine if you want to execute a process and either just get
its std
Hi -
I'm having a problem reading bash environment variables when running a
MinGW app on Cygwin's bash. I'm trying this on the MinGW list as well,
but no luck so far. The basic problem is that SHELL is not visible in
environ (or from getenv) on the app, even thought the program was
launched f
Eric Blake wrote:
Bash has two variable namespaces - shell variables, and environment
variables. Are you sure SHELL was exported to the environment, and not
just in the bash shell variable namespace?
thanks - I had no idea there were 2 variable namespaces. It looks like
everything I can see
6 matches
Mail list logo