Skip to content

Conversation

@thibaultcha
Copy link
Member

Not sure which suite to put the test in for now (signals.t seems to be slightly different). Please provide feedback if it needs to be moved.

It is a bit late right now, so I only tested it on Darwin and Linux, and the test consistently fails when nginx is compiled with openresty/luajit2 -b v2.1-agentzh.

Let me know how this looks :)

end

local cmd = string.format("kill -%d %d && sleep 0.1", signal, pid)
assert(io.popen(cmd):read("*a"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be great if we could add a test case for the case when the underlying read() syscall encounters an error other than EINTR. But it seems tricky without the help of special instrumenting facility like gdb or systemtap :(

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I found a way! See the latest patch.

@agentzh
Copy link
Member

agentzh commented Jan 2, 2018

@thibaultcha Merged. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants