scsh-hackers
[Top] [All Lists]

[Scsh-hackers] [ scsh-Bugs-439971 ] install-port and negative return val

To: noreply@sourceforge.net
Subject: [Scsh-hackers] [ scsh-Bugs-439971 ] install-port and negative return values
From: noreply@sourceforge.net
Date: Tue, 10 Jul 2001 00:45:54 -0700
List-id: Discussion among the implementors <scsh-hackers.lists.sourceforge.net>
Sender: scsh-hackers-admin@lists.sourceforge.net
Bugs item #439971, was opened at 2001-07-10 00:45
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110493&aid=439971&group_id=10493

Category: run-time
Group: None
Status: Open
Resolution: None
Priority: 7
Submitted By: Martin Gasbichler (mainzelm)
Assigned to: Olin Shivers (olin-shivers)
Summary: install-port and negative return values

Initial Comment:

>>>>> "Brian" == briand  <briand@zipcon.net> writes:

Brian> I've seen this error a couple of times, and it
seems to be randomly
Brian> occuring.  Anybody have any ideas ?

Brian> The only thing I can think of is that I keep
opening ports without
Brian> closing them.

Brian> Error: -1
>> "Unknown error 4294967295"
>> #{Procedure 10237 %install-port}
>> 256
>> #{Extensible-input-port}
>> 0

Uhhh... Here is what's going on: %install-port calls
the C procedure
install_port in fdports1.c. The return value of this
procedure is 0 on
success, negative if a scsh internal error occurs and
positive if any
procedure of the C standard library fails. 
Unfortunately, the
corresponding Scheme code doesn't take care of the
negative numbers
but coerces everything into a errno. 4294967295 is
0xffffffff or
-1. Install_port returns -1 if the given file
descriptor is either <0
or >= the number of allowed fdports (currently 256). As
the third
argument of the error message you provided is 256, I
suspect, that the
latter case happend.

I have no fix for the broken error message, but I
*guess*, you can
increase the number of fdports by setting NUM_FDPORTS
to a bigger
value in scsh/fdports1.c and run make.

This applies to 0.5.x only!!!

----------------------------------------------------------------------

You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=110493&aid=439971&group_id=10493


<Prev in Thread] Current Thread [Next in Thread>
  • [Scsh-hackers] [ scsh-Bugs-439971 ] install-port and negative return values, noreply <=