Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3A6F845C.1C1D1D3E@ece.gatech.edu> Date: Wed, 24 Jan 2001 20:41:48 -0500 From: "Charles S. Wilson" X-Mailer: Mozilla 4.75 [en] (WinNT; U) X-Accept-Language: en MIME-Version: 1.0 To: Richard Stanton CC: Cygwin Subject: Re: ncftp - works, but doesn't display any prompts References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit If your $HOME variable (%HOME% outside of bash) is not set, then HOME will default to c:/. This is a cygwin thing, not an ncftp thing. --Chuck Richard Stanton wrote: > > Thanks for checking into that, Charles. One more little thing - ncftp seems > to read and write its configuration files from/to the directory c:/.ncftp on > my disk, not c:/cygnus/.ncftp, even though I have "c:\cygnus" mounted as > "/". Should this be happening? > > Richard Stanton > > > -----Original Message----- > > From: Charles Wilson [mailto:cwilson AT ece DOT gatech DOT edu] > > Sent: Wednesday, January 24, 2001 4:53 PM > > To: Richard Stanton > > Cc: Cygwin > > Subject: Re: ncftp - works, but doesn't display any prompts > > > > > > This is a bug in ncftp or cygwin. If ncftp determines that it is not > > running from a TTY, it doesn't print any prompts. Here's the code that > > it uses to determine that (ncftp/main.c): > > > > gIsTTY = ((isatty(2) != 0) && (getppid() > 1)) ? 1 : 0; > > gIsTTYr = ((isatty(0) != 0) && (getppid() > 1)) ? 1 : 0; > > > > Here's the result of those operations in a bash window: > > isatty(2) = 1 > > isatty(0) = 1 > > getppid() = 1764 > > gIsTTY = 1 > > gIsTTYr = 1 > > > > And from a cmd prompt: > > isatty(2) = 1 > > isatty(0) = 1 > > getppid() = 1 > > gIsTTY = 0 > > gIsTTYr = 0 > > > > I'm not sure what the right fix is. Options: > > 1) Is this really a problem with the getppid implementation of cygwin > > (?) > > 2) patch ncftp to ignore the value of getppid() -- just use isatty(x) > > --> #ifdef __CYGWIN__, or for all platforms? Why does ncftp test > > getppid() anyway? > > > > --Chuck > > > > Richard Stanton wrote: > > > > > > I just installed the latest version of ncftp using the cygwin > > setup program. > > > I love the program, and it seems to work fine, but I don't get > > any prompts > > > to make it clear I'm supposed to type. Here's a sample session, my input > > > preceded by "*": > > > > > > [c:\]ncftp > > > NcFTP 3.0.2 (October 19, 2000) by Mike Gleason (ncftp AT ncftp DOT com). > > > *dir > > > dir: must be connected to do that. > > > *open ttt > > > Resolving ttt... > > > > > > Unknown host "ttt". > > > > > > How do I get it to display ftp-type command prompts? > > > > > > Richard Stanton > > > > > > -- > > > Want to unsubscribe from this list? > > > Check out: http://cygwin.com/ml/#unsubscribe-simple > > -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple