> That code looks fragile as hell. I think you fixed a bug and it might be> the absolutely proper fix, but I'd be happier about it if it was more> obvious what the rules are and _why_ that is the only case that> matters..

agreed, and we had a fair number of bugs in this area already. But i dontknow whether (or how) it could be made simpler - i think most of theugliness is a reflexion of the POSIX semantics. (combined with ptracecomplexities.)