Re: [issue1528] ktrace does not show proper return values for pi

看板DFBSD_bugs作者時間16年前 (2009/10/31 03:01), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串1/1
Stathis Kamperis (via DragonFly issue tracker) wrote: > Stathis Kamperis <ekamperi@gmail.com> added the comment: > > I've added a kprintf in ktrsysret() and here is what printed: > > 1126 a.out CALL pipe > 1126 a.out RET ret=3 error=0 code=42 pipe 3 > > Question is why `ret' contains the first file descriptor of the pair at all. > (and not zero as ought to) This is because sys_pipe returns both fds as return value, namely sysmsg_fds[0] and sysmsg_fds[1]. However ktrsysret is only called with sysmsg_result, which covers only the first fd. I guess the pipe libc glue code copies this result into the array. cheers simon -- <3 the future +++ RENT this banner advert +++ ASCII Ribbon /"\ rock the past +++ space for low CHF NOW!1 +++ Campaign \ / Party Enjoy Relax | http://dragonflybsd.org Against HTML \ Dude 2c 2 the max ! http://golden-apple.biz Mail + News / \
文章代碼(AID): #1AwpVpxx (DFBSD_bugs)