"Arnd Hanses" <[EMAIL PROTECTED]> wrote:

> >sh.empty() appears not to work if emxshell is unset:
>
> No, the problem is upper/lower case difference in:
>
>       if (sh.contains("cmd.exe")
>
>
> I propose:
>
>                       if (!sh.contains("sh") && !sh.contains("SH"))
> or
>                       if (sh.contains("cmd") || sh.contains("CMD"))

Thanks for finding the bug.  But you have to use lowercase() here.
Consider "Cmd", "Sh" etc.

> // A.H.: All UNIX shells should contain "sh" in their name

Unfortunately not.  There at least is the NYAOS: Nihongo (Japanese) Yet
Another OS/2 Shell.  (It has nothing to do with YAOS, which is a frontend
to cmd.exe)

Regards,
        SMiyata

                // OS/2 cmd.exe has another use for '&'
                if (!wait) {
                        LString sh = "";
                        sh = getenv("EMXSHELL");
                        if (sh.empty())
                                sh = getenv("COMSPEC");
                        sh.lowercase();

                        if (sh.contains("cmd"))
                                cmd = "start /min/n " + cmd;
                        else
                                cmd += " &";
                }

Reply via email to