Re: [Linux-decnet-user] Strange sethost problem
Brought to you by:
chrissie_c,
ph3-der-loewe
|
From: Patrick C. <pa...@ty...> - 2004-05-20 07:36:34
|
On Wed, May 19, 2004 at 07:58:59AM +0000, ada...@br... wrote:
> Hi
>
> I get the login prompt
> enter username followed by password
> A few lines print out indicating the login was successful, but a few
> seconds later im returned to the local prompt with the message 'Alarm
> Clock'.
>
> This is happening on vms 5 and 6 machines
>
> Using dnlogin on the same hosts works fine.
I've seen this once or twice, but am not sure what's causing it - it
could be the classic BSD signal race but I'm not quite sure how that could
happen with SIGALRM. Nevertheless you might like to try this patch:
diff -u -r1.8 sethost.c
--- sethost.c 26 Sep 2003 08:02:05 -0000 1.8
+++ sethost.c 20 May 2004 07:34:21 -0000
@@ -252,7 +252,6 @@
static void ct_timeout_proc(int x)
{ if (debug == 2) { printf(" Entered static void ct_timeout_proc...\n");}
ct_terminate_read(5);
- signal(SIGALRM,ct_timeout_proc);
}
/*-------------------------------------------------------------------------*/
static void ct_echo_input_char(char *c)
@@ -1846,6 +1845,11 @@
ct_init_term(); /* Set terminal in raw mode*/
sigemptyset(&ss);
+ sa.sa_handler = ct_timeout_proc;
+ sa.sa_mask = ss;
+ sa.sa_flags = 0;
+ sigaction(SIGALRM, &sa, NULL);
+
if (debug == 1)
{
printf("Connection to %d flavor",flavor); /*ed*/
--
patrick
|