Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
HP.com home
HP Tru64 UNIX and TruCluster Server Version 5.1B-4: Patch Summary and Release Notes > Chapter 1 Enhancements, Improvements, and Features

New Generic Subsystem Attribute Corrects UNIX98 Standards Violations

» 

»Table of Contents
Content starts here

A new tunable system attribute, std_unix98, has been added under the generic subsystem to cause the waitpid( )() and poll( )() system calls to conform to UNIX98 standard behavior.

See the revised sys_attris_generic(5) reference page delivered in this kit for more information. Refer to the standards(5) reference page for more information about industry standards and associated tags.

waitpid() System Call

Prior to the installation of this kit, the waitpid()() system call failed to conform to the following UNIX98 requirement:

A call to pid_t waitpid(pid_t pid, int *stat_loc, int options) when

  • the calling process has SA_NOCLDWAIT set or has SIGCHLD set to SIG_IGN and

  • has no unwaited for children that were transformed into zombie processes

shall block until all of its children terminate, fail, and set errno to ECHILD.

The new std_unix98 attribute enables waitpid( )() to conform to UNIX98 standard behavior.

For example, consider a situation in which a calling process has multiple children and no unwaited-for child zombie and you call waitpid( )() with a specific child PID:

  • If you set std_unix98=1 or std_unix98=4, waitpid( )() blocks until all of its children terminate (UNIX98 standard behavior).

  • If you set std_unix98=0 waitpid( )() blocks until any of its children exits.

poll() System Call

Prior to the installation of this kit, the poll()() system call fails to conform to the following UNIX98 requirement:

When no priority band has been written to on this STREAM, then a successful call to int poll(struct pollfd fds[], nfds_t nfds, int timeout) shall examine each element of the fds array for instances where the POLLWRBAND flag is set in the events member and data for a priority band greater than 0 can be written to the file descriptor specified by the fd member without blocking and shall set the POLLWRBAND flag in the corresponding revents member when found.

When no writes have taken place on any of the priority bands, a call to poll( )() blocks will time out and return failure.

The poll( )() system call has been modified so if you need standards-compliant behavior, you can use the new std_unix98 attribute.

If std_unix98 is set to a value of either 1 or 2, then the UNIX98_POLLWRBAND bit (defined as a macro in the /usr/sys/include/sys/param.h file) gets set, which results in the internal processing becoming indifferent to whichever external mapping of POLLWRBAND is in play. By default, this bit in std_unix98 is not set, so poll( )() will behave the same way as it does today.

See the revised poll(2) reference page delivered in this kit.

Printable version
Privacy statement Using this site means you accept its terms
© 2006 Hewlett-Packard Development Company, L.P.