Source Compatibility Guide

setreuid

Sets real and effective user ID's. Calls SunOS 5.x's setuid or seteuid. Exact BSD semantics are not always maintained. The real uid is not always changed. Not all cases can be handled.