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

Document fork, exec, wait and redirect2null Lua functions as deprecated #2948

Merged
merged 1 commit into from Mar 14, 2024

Conversation

pmatilai
Copy link
Member

@pmatilai pmatilai commented Mar 6, 2024

Rpm scriptlets should have no business dealing with this level of detail in process control, rpm.execut() is much saner and safer for scriptlet needs. We can't just remove because this is a public API with known users (eg glibc and setup in Fedora), but we can at least document these as deprecated.

fork() and exec() are the main "problems" here, but wait() and redirect2null() become meaningless once you take the first two away.

Fixes: #2420

@pmatilai
Copy link
Member Author

pmatilai commented Mar 6, 2024

We probably should also issue warnings on execution...

@ffesti
Copy link
Contributor

ffesti commented Mar 8, 2024

The changes look good. But we need to add the warning right away before this PR closes #2420

@pmatilai
Copy link
Member Author

pmatilai commented Mar 8, 2024

Yup. The reason the warnings are not there yet is that I'm wondering how meaningful they are in reality, ie does it reach the right audience or will it be only an annoyance to end users who can't do the damnest thing about it. But then, nobody will notice a piece of documentation changing.

Rpm scriptlets should have no business dealing with this level of
detail in process control, rpm.execut() is much saner and safer
for scriptlet needs. We can't just remove because this is a public
API with known users (eg glibc in Fedora), but we can at least document
these as deprecated with noisy warnings.

fork() and exec() are the main "problems" here, but wait() and
redirect2null() become meaningless once you take the first two away.

Fixes: rpm-software-management#2420
@pmatilai
Copy link
Member Author

Added note about the removal schedule, and noisy deprecation warnings on every use to go.

@ffesti ffesti merged commit 46bd0ed into rpm-software-management:master Mar 14, 2024
1 check passed
@pmatilai pmatilai deleted the luadeprec-pr branch March 14, 2024 14:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Deprecate Lua posix.fork() and posix.exec()
2 participants