<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px">Hey everyone,</span><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">I just had a look around for system calls that return file descriptors on a couple of docs[1][2][3] and the ones I could find are `sys_creat` and `sys_open`(not looking at the ones that return socket fds right now). </div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">The commit that introduces the -yy flag can be found here[4].</div><div style="font-family:arial,sans-serif;font-size:13px">
The commit that introduces return fd resolving can be found here[5]. Is the implementation good/similar to what you had in mind? Is there a better/cleaner way to do it?</div><div style="font-family:arial,sans-serif;font-size:13px">
Some sample output of return fd resolving can be found here[6].</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Thank you for your time!</div>
<div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">Thanks,</div><div style="font-family:arial,sans-serif;font-size:13px">Zubin</div><div style="font-family:arial,sans-serif;font-size:13px">
<br></div><div style="font-family:arial,sans-serif;font-size:13px">[1] <a href="http://www.lxhp.in-berlin.de/lhpsysc1.html#exit" target="_blank">http://www.lxhp.in-berlin.de/lhpsysc1.html#exit</a></div><div style="font-family:arial,sans-serif;font-size:13px">
[2] <a href="http://blog.rchapman.org/post/36801038863/linux-system-call-table-for-x86-64" target="_blank">http://blog.rchapman.org/post/36801038863/linux-system-call-table-for-x86-64</a></div><div style="font-family:arial,sans-serif;font-size:13px">
[3] <a href="http://docs.cs.up.ac.za/programming/asm/derick_tut/syscalls.html" target="_blank">http://docs.cs.up.ac.za/programming/asm/derick_tut/syscalls.html</a></div><div style="font-family:arial,sans-serif;font-size:13px">
[4] <a href="https://github.com/eQu1NoX/strace/commit/12405cfc96175830dc040641969cdc7caf665a9b" target="_blank">https://github.com/eQu1NoX/strace/commit/12405cfc96175830dc040641969cdc7caf665a9b</a></div><div style="font-family:arial,sans-serif;font-size:13px">
     <a href="https://github.com/eQu1NoX/strace/commit/166f7ee4927015ac8ea42a63a160e59ca964752b" target="_blank">https://github.com/eQu1NoX/strace/commit/166f7ee4927015ac8ea42a63a160e59ca964752b</a></div><div style="font-family:arial,sans-serif;font-size:13px">
[5] <a href="https://github.com/eQu1NoX/strace/commit/55eec746ec64fd51c3be42b861eb26f16927651d" target="_blank">https://github.com/eQu1NoX/strace/commit/55eec746ec64fd51c3be42b861eb26f16927651d</a></div><div style="font-family:arial,sans-serif;font-size:13px">
[6] <a href="https://gist.github.com/eQu1NoX/ac2d2f8734955e7bdedf" target="_blank">https://gist.github.com/eQu1NoX/ac2d2f8734955e7bdedf</a></div>
</div>