Re: scotty 2.0.0 -> 2.0.1 and Ultrix

af@iconet.ico.olivetti.com
Thu, 19 Oct 1995 15:16:19 +0100

>From af Tue Oct 17 15:16:03 +0100 1995 remote from iconet.ico.olivetti.com
From: af@iconet.ico.olivetti.com
Subject: tk4.0 problem on svr4.0
To: schoenw@ibr.cs.tu-bs.de
Date: Tue, 17 Oct 1995 15:16:03 +0100 (CET)
>From: "Andrea Fino" <slave!iconet!af>
Cc: tkined@ibr.cs.tu-bs.de
X-Mailer: ELM [version 2.4 PL23]
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Received: from iconet.ico.olivetti.com by iconet.Ico.Olivetti.Com; Thu, 19 Oct 95 14:25:04 WET
Content-Type: text/plain; charset=US-ASCII
Content-Length: 1935

Hi,
I got troubles on a svr4.0 box.

if you setup a snmp session and an asynchronous for example
get request:

set s [snmp session -community foo]
# the community does not exist, it will timeout
$s get sysDescr.0 { puts "something happens" }

the scotty interpreter will block... no prompt anymore.

My guess the problem (really stupid) is in the
tkEvent.c file, of the tk4.0 distribution.

here a raw fix :
numFound = select(numFds, (SELECT_MASK *) &ready[0],
(SELECT_MASK *) &ready[MASK_SIZE],
(SELECT_MASK *) &ready[2*MASK_SIZE], timeoutPtr);
if (numFound == -1) {
/*
* Some systems don't clear the masks after an error, so
* we have to do it here.
*/

memset((VOID *) ready, 0, 3*MASK_SIZE*sizeof(fd_mask));
}
if (numFound == 0) {

/*
* on a svr4.0 machine you have to do this also....
*/

memset((VOID *) ready, 0, 3*MASK_SIZE*sizeof(fd_mask));
goto checkTime;
}
goto checkFiles;

The similar stuff is in the idlelist (but correct in the svr4.0 case)
if (numFound <= 0) {
/*
* Some systems don't clear the masks after an error, so
* we have to do it here.
*/

memset((VOID *) ready, 0, 3*MASK_SIZE*sizeof(fd_mask));
}

I hope this can help
ciao,
Andrea

-- 
                      ```
                     (o o)
+-----------------oOO--(_)--OOo-----------------------------+
|                                                           |
|Andrea Fino - Internet E-Mail - af@iconet.ico.olivetti.com |
|                                                           |
|Phone +39-0125-521711 Fax +39-0125-521104                  |
|                                                           |
|     Of course these are my views...etc...etc...  8-)      |
|                                                           |
|GCS                                                        |
|  -d+(---) -p+ c+++ l u++ e* m++ s/s n+ h f(+) g+ w+ t r y?|
+-----------------------------------------------------------+