svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys

Andrey Chernov ache at freebsd.org
Mon Aug 29 17:46:53 UTC 2016


On 29.08.2016 19:51, John Baldwin wrote:
>> int
>> ptrace(int request, pid_t pid, caddr_t addr, int data)
>> {
>>
>> 	errno = 0;
>> 	return (__sys_ptrace(request, pid, addr, data));
>> }
> 
> Certainly I think having a C wrapper like this makes more sense than
> doing it all in assembly N times.  I would probably prefer to keep the
> manpage language the way it is though.

Either we implement this wrapper or left all things as is, we need to
document internal errno clearing additionally, to not make people wonder
why errno becomes 0, probably with the mention that program should not
relay on this obsoleted implementation feature.

IMHO, it will be better to not clear errno at all, considering 'before
call' way documented everywhere and consumers behavior analyzed by kib@



More information about the svn-src-head mailing list