summaryrefslogtreecommitdiff
path: root/sys/modules/lua/lua.c
diff options
context:
space:
mode:
authorkamil <kamil@NetBSD.org>2017-12-26 08:30:57 +0000
committerkamil <kamil@NetBSD.org>2017-12-26 08:30:57 +0000
commita36ead30aee355813e9fd627dcf32bc29b3b51b9 (patch)
tree5f59c467dda21bbbf4b7ab329a9207b26bc0a20d /sys/modules/lua/lua.c
parent17b09fc2d4ed51fe2a4a3b4c533e047fe4423ec2 (diff)
Refactor pipe1() and correct a bug in sys_pipe2() (SYS_pipe2)
sys_pipe2() returns two integers (values), the 2nd one is a copy of the 2nd file descriptor that lands in fildes[2]. This is a side effect of reusing the code for sys_pipe() (SYS_pipe) and not cleaning it up. The first returned value is (on success) 0. Introduced a small refactoring in pipe1() that it does not operate over retval[], but on an array int[2]. A user sets retval[] for pipe() when desired and needed. This refactoring touches compat code: netbsd32, linux, linux32. Before the changes on NetBSD/amd64: $ ktruss -i ./a.out [...] 15131 1 a.out pipe2(0x7f7fff2e62b8, 0) = 0, 4 [...] After the changes: $ ktruss -i ./a.out [...] 782 1 a.out pipe2(0x7f7fff97e850, 0) = 0 [...] There should not be a visible change for current users. Sponsored by <The NetBSD Foundation>
Diffstat (limited to 'sys/modules/lua/lua.c')
0 files changed, 0 insertions, 0 deletions