scsh-users
[Top] [All Lists]

another bug?

To: shivers@lcs.mit.edu
Subject: another bug?
From: Sean Doran <smd@sprint.net>
Date: Mon, 29 Jul 1996 16:37:13 -0400
Cc: scsh-bugs@martigny.ai.mit.edu
Reply-to: smd@sprint.net
Sender: smd@chops.icp.net
Um, first, sorry to scsh-bugs and to Olin for not Ccing
scsh-bugs on the last bug report (involving socket-address->unix-address)...

There is an apparent bug in scsh/network1.c in
scheme_bind:

        name.sun_path[scheme_length+1]='\0'; /* add null */
                                   ^^

On SPARCs, this works OK; we always bind to the correct
address.

However, on i386en, if one does 

(define (ow s sa) (close-socket s))
(bind-listen-accept-loop protocl-family/unix ow "/tmp/ZZZZ")

we create /tmp/ZZZZ just fine.  However, if we interrupt
this and then try the (bind-...) call again with the same
arguments, we end up creating "/tmp/ZZZZ?".

Removing the +1 above works on both platforms.

Just in case something's weird:

NetBSD titan.sprintlink.net 1.2_BETA NetBSD 1.2_BETA (TITAN) #1: Fri Jul 19 
06:35:48 EDT 1996     
smd@titan.sprintlink.net:/usr/src/sys/arch/sparc/compile/TITAN sparc
NetBSD isis.sprintlink.net 1.2_BETA NetBSD 1.2_BETA (ISIS) #1: Fri Jul 19 
14:44:35 PDT 1996     
smd@isis.sprintlink.net:/usr/src/sys/arch/i386/compile/ISIS i386

however, I suspect that [scheme_length] on its own is
correct, yes?

I suppose I want to do the same thing in scheme_connect()
as well?

        Sean.

<Prev in Thread] Current Thread [Next in Thread>
  • another bug?, Sean Doran <=