Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

popen: raise an error on NaN as a timeout or a signal number #9975

Open
Totktonada opened this issue Apr 24, 2024 · 0 comments
Open

popen: raise an error on NaN as a timeout or a signal number #9975

Totktonada opened this issue Apr 24, 2024 · 0 comments
Labels
bug Something isn't working popen

Comments

@Totktonada
Copy link
Member

Timeouts in popen are not checked against NaN.

The following methods accept NaN as a timeout and it works like an infinity timeout.

ph:wait({timeout = 0/0})
ph:read({timeout = 0/0})
ph:write({timeout = 0/0})

They should raise IllegalParams error.

It also worth to verify a signal number against NaN. Now it returns nil, err, where err is SystemError.

ph:signal(0/0)
---
- null
- Unable to killpg 18109 signo -2147483648: Invalid argument
...

It should raise IllegalParams error.

@Totktonada Totktonada added bug Something isn't working popen labels Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working popen
Projects
None yet
Development

No branches or pull requests

1 participant