How to use option of "-e | --exec" of mintty to run another application

505 views
Skip to first unread message

bang bang

unread,
Dec 10, 2012, 9:28:05 PM12/10/12
to mintty-...@googlegroups.com
With the help of mintty, we can use it to run another application with the option "-e | --exec", but I could not get anything in term. 
My command: ./mintty.exe  -h always -e ls.exe, at last I will use my application to replace ls.exe 
The result is in attachment.
I would be grateful if someone help me, thank you very much!!
mintty.png

Renato Silva

unread,
Dec 11, 2012, 3:53:26 AM12/11/12
to MinTTY

As I said in the MinGW list, I can reproduce the problem (tested in 1.0.30 and 1.1.2). Interactive mode of bash is not affected though (as we know otherwise no one would be able to use MinTTY with bash at all). I don't know how MinTTY determines whether to print program's output though, and I could not find any command line switch for that. However, isn't the Windows terminal console enough for you?

Renato Silva

unread,
Dec 11, 2012, 3:54:55 AM12/11/12
to MinTTY

I mean 1.0.3 not 1.0.30.

Andy Koppe

unread,
Jan 3, 2013, 10:09:53 AM1/3/13
to mintty
This looks like a problem with MSYS's pseudo terminal (pty) device
implementation to me: when a process exits, output that the process
has written but that hasn't yet been read from the pty seems to be
discarded, i.e. mintty gets an end-of-file indication when trying to
read that output. It doesn't happen on current Cygwin. (MSYS is a fork
of an old Cygwin version.)

A possible workaround is to ensure that mintty gets time to read the
output by adding a sleep command, like so:

mintty -h always -e /bin/sh -c 'ls; sleep 1'

Regards,
Andy
Reply all
Reply to author
Forward
0 new messages