General PTY and CONSOLE question--SOLVED

Gene Smith gds at chartertn.net
Tue Sep 23 14:29:54 UTC 2008


Joel Sherrill wrote, On 09/23/2008 09:39 AM:
> Chris Johns wrote:
>> Joel Sherrill wrote:
>>   
>>> Sounds like the socket close code has no idea that it shouldn't
>>> close it a second time.  Somehow we get deep in the bowels
>>> for a closed file descriptor.  I wonder if simply calling close()
>>> twice on a socket fd would reproduce the problem.
>>>     
>> I think this is bug 785.
>>
>> (https://www.rtems.org/bugzilla/show_bug.cgi?id=785)
>>   
> Gene.. can you confirm this fixes your situation?  If so,
> I would like to apply this patch to all open branches and
> the head.

Joel,Chris,
This may indeed be a bug but I don't think it is what I am seeing 
exactly. First, this assumes you have already blocked in accept(). In my 
situation I have not yet blocked in accept. I go into accept() and then 
return when I see that the SS_CANTRECEIVEMORE flag is set. This flag is 
set when the code chain beginning with fclose(stdin) occurs 
(improperly?) with no console driver installed after calling 
rtems_panic() in another thread.

Also, the patches are against 4.6 and 4.7. Not sure if they are OK with 
4.8.0 which I have. Can you send me an updated patch or, even better, 
the complete files with the patch applied and I will try them? You can 
send to gd.smth at gmail dot com.  (Yes, smth is right).

-gene




More information about the users mailing list