delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/03/02/17:20:43

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <36DC63EE.5829FFD8@digisle.net>
Date: Tue, 02 Mar 1999 14:19:27 -0800
From: JJ Streicher-Bremer <jj AT digisle DOT net>
X-Mailer: Mozilla 4.5 [en] (WinNT; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Cygwin List <cygwin AT sourceware DOT cygnus DOT com>
Subject: Active Perl console access

I am trying to get this snippet of code working on my system. 
--------------------------------
use Term::ReadKey;
use Fcntl;
#Set the FileHandles to TRUE
$|=1;

ReadMode 2;

print "\nEnter passwd: ";

$t = ReadLine 0;

chop $t;

print "\nYou entered $t\n";
---------------------------------

My system is:
WinNT 4.0 SP4 
Active Perl 5.005.509
Connecting via sshd

When I try to run my code I get this error:
{jj-a AT xena}~/perl/readpasswd: perl
readpass                                    
GetConsoleMode failed, LastError=|6| at
d:\apps\perl\site\lib/Term/ReadKey.pm line 247.

When I run it via a local bash shell, a cmd.exe shell, or a remote
Ataman Telnetd shell it works as expected.

Elsewhere in my code I need to use the Win32::AdminMisc module so a port
of perl is out (unless the Win32 modules run under cygnus perl this
way).

Any ideas on how to pass console information from an sshd shell to perl?

Thanks in advance.

-- 
JJ Streicher-Bremer
NT Systems Administrator
Digital Island Inc.
415-228-4189

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019