CAN I USE ALARM() TO TIMEOUT A BLOCKING?

ITEM: RTA000049574



QUESTION:                                                                       
I have a modem connecting my RS/6000 to a leased SNA/SDLC line. The             
applicaiton that uses this line blocks when the line is not active.             
When the modem is powered up and ready but the line is not active,              
the application successfully allocates the snaopen() routine but                
the ensuing snalloc() call blocks forever until the line becomes                
active. The books says the snalloc() should time out. I have received           
and installed the latest SNA and SDLC fixes, but the problem persists.          
I would like to circumvent this problem by using the alarm() function           
to provide a timeout on the snalloc(). The program will periodically            
retry the connection. Will I cause a problem if I bail out of the               
snalloc() with a SIGALARM multiple times?                                       
                                                                                
---------- ---------- ---------- --------- ---------- ----------                
A: It is recommended that you code the return_control allo_str field to        
   ALLOC_IMMEDIATE as the snalloc call will fail if no such sessions            
   are immediately available preventing the block you are experiencing.         
   The use of SIGALARM is known to cause problems.                              
                                                                                
   Application of PTF U423978 may be required if you are not able               
   to code ALLOC_IMMEDIATE for return_control and SNA Services/6000 is          
   installed.  Verify the installation of the PTF with the following            
   command:                                                                     
                                                                                
      lslpp -ah sna.sna.obj                                                     
                                                                                
   If the PTF is not displayed or is not installed with a state of              
   APPLIED or COMMIT, contact appropriate channel to order.  PTF                
   U432978 was a result of APAR IX35153.                                        
                                                                               
   If you have SNA Server/6000, the ALLOC_IMMEDIATE value incorporated          
   and there is no need for a PTF.                                              
                                                                                
   For the return_control of the Allocate, the alloc_immediate means            
   the following:                                                               
                                                                                
   Allocates a session if a session is immediately available. (A                
   session is immediately available if it is active, is not in use by           
   another conversation, and is a contention winner session.) The call          
   fails if no such sessions are available.                                     
                                                                                
   Documentation is located the "Transaction Program Reference" for             
   AIX SNA Server/6000, SC31-7003-01, P. 318.                                   
                                                                                
---------- ---------- ---------- --------- ---------- ----------               
                                                                                
                                                                                
This item was created from library item Q672741      CWCVM                      
                                                                                
Additional search words:                                                        
ALARM AUTO AUTOMATIC BLOCKING CALL COMMUNICATIO CWCVM IX OCT94 OZIBM            
OZNEW RISCSNA RISCSYSTEM SNA SNALLOC SOFTWARE TIMEOUT                           
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                                
                                                                               


WWQA: ITEM: RTA000049574 ITEM: RTA000049574
Dated: 11/1996 Category: RISCSNA
This HTML file was generated 99/06/24~12:43:18
Comments or suggestions? Contact us