This is the mail archive of the cygwin@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
bash bug
- To: gnu-win32@cygnus.com
- Subject: bash bug
- From: Aldo Mazzilli <aldo.mazzilli@inria.fr>
- Date: Wed, 17 Feb 1999 16:11:48 +0100
- CC: aldo.mazzilli@inrialpes.fr
- Delivered-To: listarch-cygwin@sourceware.cygnus.com
- Delivered-To: mailing list cygwin@sourceware.cygnus.com
- Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
- Organization: INRIA
- Sender: cygwin-owner@sourceware.cygnus.com
- Sender: Aldo.Mazzilli@inrialpes.fr
I've written a TCL script which does the following things :
1 --> gets a Shell command from stdin
2 --> open a Bash shell within a pipe
3 --> puts the command on the pipeline
4 --> gets the result
PROBLEM :
I can't get any results after the 4th step with Cygnus Solution : :-(
I get the right result with MKS KSH or UWIN KSH : :-)
Can you give me any reason, please ???
=======================================================================
My TCL script can easily be translated into the following C program :
#include <stdio.h>
FILE *recep, *df;
main()
{
char buf[BUFSIZ];
char string[256], rec[256];
printf("Enter your command :") ;
scanf("%s", &string) ;
strcat(string,"\n") ;
df = popen("sh", "wb");
fputs(string, df) ;
while (fgets(buf, BUFSIZ, df) != NULL)
(void) printf("%s", buf);
pclose(df) ;
}
This C program works fine under Cygnus, MKS and UWIN solutions.
--
=======================================================================
,',',',',',',' Aldo MAZZILLI | INRIA Rhone-Alpes |
,',',',',',',' aldo.mazzilli@inrialpes.fr| 655, avenue de l'Europe |
,',',',',',',' Tel : 04 76 61 53 91 | 38330 Montbonnot St Martin |
,',',',',',',' Fax : 04 76 61 52 52 | FRANCE |
,',' *** Site WEB : http://www.inrialpes.fr/vasy/people/Aldo.Mazzilli |
=======================================================================
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com