Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 29 Aug 2016 20:46:47 +0300
From:      Andrey Chernov <ache@freebsd.org>
To:        John Baldwin <jhb@freebsd.org>, Konstantin Belousov <kostikbel@gmail.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r304928 - in head/lib/libc: amd64/sys i386/sys sys
Message-ID:  <ca29b4cf-3615-9d8b-8a71-b6edff9e0290@freebsd.org>
In-Reply-To: <18206408.GMLM77D01s@ralph.baldwin.cx>
References:  <201608272303.u7RN3N0D078505@repo.freebsd.org> <1595604.93PBdSz0kX@ralph.baldwin.cx> <20160829065813.GP83214@kib.kiev.ua> <18206408.GMLM77D01s@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
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@




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ca29b4cf-3615-9d8b-8a71-b6edff9e0290>