Investigating The Github Safe_sleep Sh Bash Script Situation
Github Luizm Action Sh Checker A Github Action That Performs Static When a 4 line bash script can silently consume your cpu for weeks, it raises uncomfortable questions about what else might be lurking in the dependencies we trust implicitly. Even ignoring the pretty clear bug, what makes this bash script "safer" than calling into the posix standard sleep utility? it doesn't seem to solve any problem; meanwhile, it's less portable and needlessly eats cpu time by busy waiting.
Automating Github Repository Initialization With Bash Script The discussion, initiated by logiclrd, centers on safe sleep.sh, a script embedded within the actions runner codebase. the core of the concern is that this script, designed to handle pauses, exhibits several "code smells" that raise questions about its necessity, implementation, and documentation. It's called "safe sleep" because it tries to "sleep" without the assumption of the sleep program being installed (protip: even alpine comes with sleep preinstalled since it's posix). Even ignoring the pretty clear bug, what makes this bash script "safer" than calling into the posix standard sleep utility? it doesn't seem to solve any problem; meanwhile, it's less portable and needlessly eats cpu time by busy waiting. The code change replaced instances of the posix "sleep" command with a "safe sleep" script that failed to work as advertised. it was supposed to allow the github actions runner – the application that runs a job from a github actions workflow – to pause execution safely.
Github Saket590 Basictroubleshootingscriptubuntu Shell Script Even ignoring the pretty clear bug, what makes this bash script "safer" than calling into the posix standard sleep utility? it doesn't seem to solve any problem; meanwhile, it's less portable and needlessly eats cpu time by busy waiting. The code change replaced instances of the posix "sleep" command with a "safe sleep" script that failed to work as advertised. it was supposed to allow the github actions runner – the application that runs a job from a github actions workflow – to pause execution safely. Learn how to reduce self hosted github actions runner cpu usage by replacing the busy waiting sleep script with a more efficient alternative. Due to the feature request to use safe sleep instead of standard sleep function in all bash scripts, i created a new pr (already merged to the main). this pr contains changes that were in the previously linked pr (just in the new bash script), as well as those additional requests. Contribute to actions runner development by creating an account on github. The file includes a test that it is running in bash, implying that it is intended to work with non bash scripts. but, it also uses bash specific syntax that could only work on bash.
Comments are closed.