help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Possible problem with wait command in bash ?


From: y . marchiani
Subject: Possible problem with wait command in bash ?
Date: Sat, 22 Aug 2026 21:17:55 +0200 (CEST)

Hello



I have read on the website at the following address 
https://www.gnu.org/software/bash/ to send email, to ask for help or for 
submitting a bug related to bash.

Then I am not an english native speaker, if you don't understand what I do mean 
or if I do explain stuff in a weird way ; feel free to signal it.



Also before explaining my problem with bash I want to clarify, who I am and my 
competences... I am using linux for around 10 years and I am a mechanic. So I 
am not a highly skilled programmer but I do think I kinda roughly understand 
minimal level of linux and bash.

So now if I have to explain my problem with the wait command in bash.
I am trying to code a script to launch background jobs of ffmpeg to detect the 
audio level (it's a filter in ffmpeg called volumedetect).
So I have a function that launch inside a for loop the ffmpeg command with the 
& to make it as background job.
Those background jobs then are waited and I do get back the result of each 
ffmpeg command in a separate file in /tmp.
Then all the results are concatenated (one file per line) and echoed at the end 
of the function.

But the problem is that wait return an 127 exit code in the middle of the 
function.
I have asked chatgpt for some help and looked all this saturday on the internet 
to get some info about this problem... I have found that bash 5.2.37 could have 
a bug with the wait command (I am on Debian Trixie).
So I did download the last bash version and compile it from source (the version 
5.3.0) but the problem with the wait command is still happening. It could be a 
stupid mistake from my side but after looking "everywhere" (from my point of 
view) I am kinda lost...

That is why I decided to send this email.



I didn't join any file or code at the moment.
I can send you all my code and also what chatgpt told me and also the results I 
got in my bash shell.

Best regards



reply via email to

[Prev in Thread] Current Thread [Next in Thread]