j'ouvre deux terminaux A & B:
Depuis A :
> sleep 60 &
[1] 11808
> wait 11808 # génial, j'attends
Depuis B :
> wait 11808
bash: wait: pid 11808 is not a child of this shell
caramba!!!
je ne voudrais pas être obligé à scruter en permanence l'état du processus dont j'attends qu'il se termine.
Merci pour vos réponses.