[RFC 0/1] Signal handling
by Richard Ipsum
This one is just an RFC because it's trickier, and I don't know if I
got the approach right.
I'm not even trying to return the `oldact` field at this point, or do anything
with flags.
I was just curious to see how this would be done at all. Does the approach
look reasonable?
Thanks,
Richard
Richard Ipsum (1):
Bind sigaction(2)
luxio.c | 54 ++++++++++++++++++++++++++++++++++++++++++++++++
tests/test-sigaction.lua | 38 ++++++++++++++++++++++++++++++++++
2 files changed, 92 insertions(+)
create mode 100644 tests/test-sigaction.lua
--
2.11.0
4 years, 11 months
[PATCH 0/3] misc
by Richard Ipsum
Richard Ipsum (3):
Bind termident functions
Bind sysconf(2)
Bind creat(2)
luxio.c | 74 ++++++++++++++++++++++++--
luxio_constants.inc.in | 135 ++++++++++++++++++++++++++++++++++++++---------
tests/test-creat.lua | 35 ++++++++++++
tests/test-sysconf.lua | 10 ++++
tests/test-termident.lua | 17 ++++++
5 files changed, 240 insertions(+), 31 deletions(-)
create mode 100644 tests/test-creat.lua
create mode 100644 tests/test-sysconf.lua
create mode 100644 tests/test-termident.lua
--
2.11.0
4 years, 11 months
[PATCH 0/2] sio.tomode fixes
by Richard Ipsum
Reproduce #1:
cat << EOF > bug.lua
local l = require "luxio"
local sio = require "luxio.simple"
path = "luxio-test-creat-test-file"
--local mode = sio.tomode("-rw-r--r--")
local mode = sio.tomode("755")
print(mode)
local fd, errno = l.open(path, l.O_CREAT, mode)
if fd == -1 then
io.stderr:write(("creat: %s\n"):format(l.strerror(errno)))
os.exit(l.EXIT_FAILURE)
end
local r, st = l.stat(path)
if r == 0 and l.bit.band(st['mode'], tonumber(777, 8)) == mode then
print(("Successfully created test file %s"):format(path))
else
print("Test failed!")
end
EOF
% ./luxio-5.1 bug.lua
% ls -l luxio-test-creat-test-file
---------- 1 richardipsum richardipsum 0.0 12 Oct 21:37 luxio-test-creat-test-file
With fix:
% ./luxio-5.1 bug.lua
% ls -l luxio-test-creat-test-file
-rwxr-xr-x 1 richardipsum richardipsum 0.0 12 Oct 21:48 luxio-test-creat-test-file
Reproduce #2:
same code as #1 but local mode = sio.tomode(0755)
% ./luxio-5.1 bug.lua
% ls -l luxio-test-creat-test-file
--wxr----t 1 richardipsum richardipsum 0.0 12 Oct 21:50 luxio-test-creat-test-file
With fix:
% ./luxio-5.1 bug.lua
% ls -l luxio-test-creat-test-file
-rwxr-xr-x 1 richardipsum richardipsum 0.0 12 Oct 21:52 luxio-test-creat-test-file
Richard Ipsum (2):
Fix regex in sio.tomode
sio.tomode: interpret mode as octal value
luxio/simple.lua | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--
2.11.0
4 years, 11 months
[PATCH 0/1] Bind access
by Richard Ipsum
Richard Ipsum (1):
Bind access(2)
luxio.c | 13 ++++++++++++-
luxio_constants.inc.in | 6 ++++++
tests/test-access.lua | 34 ++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+), 1 deletion(-)
create mode 100644 tests/test-access.lua
--
2.11.0
4 years, 11 months
[PATCH 0/4] Bind getgroups and db access functions
by Richard Ipsum
Richard Ipsum (4):
Bind getgroups(2)
Bind getgrgid(3) and getgrnam(3)
Bind getpwuid(3) and getpwnam(3)
Add db access test
luxio.c | 250 +++++++++++++++++++++++++++++++++++++++++++++++-
tests/test-dbaccess.lua | 55 +++++++++++
2 files changed, 302 insertions(+), 3 deletions(-)
create mode 100644 tests/test-dbaccess.lua
--
2.11.0
4 years, 11 months