Details

[Home]

Issue of the Standard # S0055

Brief

No requirements on invariability of the tree structure by the calls of 'action' function.

Detailed Description

There are no clear requirements that action function passed as a parameter to twalk() should not alter the structure of the tree, i.e. it should not call tsearch() or tdelete(). Nevertheless, such requirements look valid especially for implementations that are based on balanced trees.

Problem location(s) in the standard

The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004 Edition (SUS 3.0), System Interfaces, description of functions <nobr>tsearch()</nobr>, <nobr>tdelete()</nobr>, <nobr>tfind()</nobr>, <nobr>twalk()</nobr>.

Possible solutions

It is proposed to clarify this place in the Standard and add the following: "The application shall ensure that the function pointed to by action does not alter the structure of the tree." Alternatively, it should be explicitly said that "the function pointed to by action may alter the structure of the tree".

Accepted

POSIX aardvark,
Request Number 143

[Home]