Final result of the finite tasks in the background:
( wget google.com && zenity --info || zenity --error ) & PID=$!
...if ... kill $PID ...zenity ...
Why will not he act? How should it be good?
[edit:] Fixed, thanks.
Final result of the finite tasks in the background:
( wget google.com && zenity --info || zenity --error ) & PID=$!
...if ... kill $PID ...zenity ...
Why will not he act? How should it be good?
[edit:] Fixed, thanks.
With what you posted, wget
get started in the background, but zenity
doesn't, it runs right after wget
has been started. So it has no chance at all of getting wget
's return value: wget
hasn't completed yet!
Try something like:
( wget google.com && zenity --info || zenity --error ) &
PID=$!
if ... kill $PID ...zenity ...