Chapter Contents

Previous

Next
SAS/C Software: Changes and Enhancements, Release 6.50


Enhanced OpenEdition Library Functions

 This section describes the SAS/C OpenEdition library functions enhanced by Release 6.50.


alarmd

  As a result of changes in the MVS operating system, the alarmd function description for Release 6.50 requires an update in the CAUTION Section of the "Function Descriptions" in Chapter 6 of the SAS/C Library Reference, Volume 1, Release 6.00 on page 6-32. 

Replace the following sentence under CAUTION:

Old If SIGALRM is handled by OpenEdition,  alarmd is not available.
 New If SIGALRM is handled by OpenEdition,  alarmd is not available in releases of MVS prior to MVS 5.2.2.
 


siglongjmp and blkjmp

    The sigsetjmp and  siglongjmp functions, introduced in SAS/C Release 6.00, allow the signal mask to be saved as part of a  setjmp operation, and restored as part of a  longjmp operation. In the 6.00 implementation,  siglongjmp restored the signal mask before searching the stack for  blkjmp callers. 

This meant that the old signal mask was restored before any caller of blkjmp received control to intercept the jump. Since in most cases the restored signal mask allows more signals than the old signal mask, this had the effect of allowing a signal to be discovered in a  blkjmp cleanup routine, thereby causing part of the cleanup to be bypassed.  

The 6.50 version of the library modifies siglongjmp so that the signal mask is changed as late as possible. If there is no interference from  blkjmp callers, the signal mask is changed immediately before control is returned to the target  sigsetjmp call. 

As with the 6.00 library, if a call to siglongjmp is intercepted by  blkjmp, the signal mask is restored immediately before control is returned to the  blkjmp call.  

Additionally, a new function called sigblkjmp has been defined. This function is an enhanced version of  blkjmp, which stores the signal mask data associated with a  siglongjmp in the buffer passed to  sigblkjmp as well as the registers and other environmental information. 

This means that the signal mask is not changed when control is given to a sigblkjmp cleanup routine. The mask is only changed when control passes to the original  sigsetjmp call, or to a caller of the old  blkjmp function.  

Use of sigblkjmp rather than  blkjmp is recommended in any program which uses  sigsetjmp and  siglongjmp.  

Note:   Both blkjmp and  sigblkjmp are compatible with both the  setjmp and  longjmp functions as well as with their  sig- versions.  [cautend] 


sleepd

  As a result of changes in the MVS operating system, the sleepd function description requires an update in the DESCRIPTION Section of the "Function Descriptions" in Chapter 6 of the SAS/C Library Reference, Volume 1, Release 6.00 on page 6-434. 

Replace the following sentences under DESCRIPTION:

Old If SIGALRM is managed by OpenEdition, the  sleep function is implemented by OpenEdition, and the  sleepd function is not implemented. In this case, note that the occurrence of a signal managed by SAS/C does not cause  sleep to terminate.
 New If SIGALRM is managed by OpenEdition, the  sleep and  sleepd functions are implemented by OpenEdition. In this case, note that the occurrence of a signal managed by SAS/C does not cause  sleep or  sleepd to terminate.
 


tcsetpgrp

  IBM has changed the way the OpenEdition tcsetpgrp system call works. As a result, several changes for Release 6.50 are required to the existing documentation, SAS/C Library Reference, Volume 2, Release 6.00.  

First, the tcsetpgrp function needs an addition note in the DESCRIPTION Section on page 20-96 to clarify the process handling of the  SIGTTOU signal. 

Replace the following sentence under DESCRIPTION:

Old Note not required.
New

Note:   If tcsetpgrp is called from a background process, the signal  SIGTTOU is generated, unless the signal is ignored or blocked. If the signal is defaulted, this will cause the calling process to stop. If the signal is handled,  tcsetpgrp will set  errno to  EINTR and fail. For this reason, you should ignore or block  SIGTTOU if you call  tcsetpgrp from a background process.  [cautend]

 

Second, a minor typographical error was discovered in last paragraph of the tcsetpgrp DESCRIPTION Section on page 20-96 and was not corrected by the errata sheet for Volume 2.  

Make the following correction under DESCRIPTION:

Old SITTIN
New SIGTTIN

Lastly, due to its level of complexity, the example for setpgid, which uses  tcsetpgrp, requires modifications. The  setpgid example is located in the SAS/C Library Reference, Volume 2, Release 6.00 in the middle of page 20-75. 

Replace the following lines under EXAMPLE:

Old

/* become foreground process group */
if (tcsetpgrp(STDIN_FILENO, getpid()))
     erreport("tcsetpgrp");
 

New

/* ignore SIGTTOU during tcsetpgrp */
signal(SIGTTOU, SIG_IGN);
/* become foreground process group */
if (tcsetpgrp(STDIN_FILENO, getpid()))
      erreport("tcsetpgrp");
/* restore normal SIGTTOU handling */
signal(SIGTTOU, SIG_DFL);


Chapter Contents

Previous

Next

Top of Page

Copyright © Mon Mar 9 09:11:22 EST 1998 by SAS Institute Inc., Cary, NC, USA. All rights reserved.