Cygwin <--> CMD App Problem (Terminal Type?)

I'm not sure if this is the right place to post this, but here it is. We have a nightly process that runs on an HP-UX box to stop our application and backend database servers, unmount their SAN hosted file systems, and then snapshot the SAN LUNs for backup and refresh of data on "report" and "test" systems. For the past five years it's all been done on the HP-UX side. But the new EVA4000 SAN we just moved to was purchased with a Windows 2003 server as the SAN manager.

We still need the snapshot creation/deletion managed from the HP-UX side. So to try and get this to happen, I installed Cygwin on the box. OpenSSH, Bash, and Vim were selected components. I got OpenSSH working great with the auth keys. I also am able to run many Windows CLI commands from the default Bash shell, or if need be set CMD.exe up as a shell for the SSH session. The problem is when I attempt to run the HP Commandview EVA "SSSU.EXE" command. The prompt goes away and there is no output from the app. I have to Ctrl-C to get out and sometimes an image of SSSU.EXE is left running on the system.

If I run SSSU from Bash on the Windows box itself, it also does the same thing. However, if I run it from CMD.EXE on the Windows box, it works. So I tried replacing the shell for the SSH login with CMD.EXE and SSSU still fails. As a test I tried running MS 'EDIT' in CMD directly on the box. That works as expected. But in Bash, or over OpenSSH, it behaves the same way the SSSU does.

What I suspect is happening is that both EDIT and SSSU expect something that only the CMD shell provides when executed locally. Likely some form of console or tty that Cygwin doesn't provide. So my question is... what might these applications be expecting that Cygwin isn't providing?

I wasn't sure whether to post this here or to the Windows mailing list I belong to. It feels kind of halfway between the Windows and *nix worlds.

I found a simple solution. There is an SSSU application that is native for HP-UX 11.23 on Itanium servers. Instead of needing to mess with Cygwin, I can just run a native application on Unix. In the process though, I learned the following as sidenotes:

  1. According to the Cygwin docs, console applications sometime just won't work in the Cygwin environment. In those cases, they recommend running those applications in plain old CMD and if you need *nix commands, you can use the Cygwin apps from within CMD. This gives you the maximum interoperability possible in that scenario. It would not have worked for me.

  2. If you want more unix-like terminal access, use 'rxvt' in Cygwin. Even without the Cygwin X server, it can give you X window cut and paste and a host of other *nix-like functionality.

  3. There is an SSH server for Windows called Freesshd that does allow for console apps to work. This may have worked for me, but now that I have a native Unix app, I don't have a reason to try it in this instance. It seems that the only real benefits to Freesshd over Cygwin SSH are the ability to run console mode programs as expected including ANSI color, and a GUI to manage the server that is more applicable to Windows users.

  4. There are two devices /dev/conin and /dev/conout in Cygwin which provide some stdio-like functionality but in Windows style rather than *nix. At least as far as I can tell. That was a bit beyond me, so I'll leave it to others to correct me if I'm wrong.