I'm trying to make a yad process collaborate with another (a mounter but that's not very important).
I have a code structure like this (simplified) in the critical part:
`
yad --list --button=gtk-close:1 --button=gtk-ok:0 "${CONF_LIST[@]}" 2>/dev/null &
yad_pid=$!
#3 is the file descriptor of the named pipe of the other process
{ read -u 3 line && kill -USR2 $yad_pid 2>/dev/null; } & pidof_killer=$!
wait $yad_pid
result=$?
kill $pidof_killer 2>/dev/null
#do something with result.
My problem here is that part of what i need (besides the result) is the list selection. Previously to being a fork, i could just do
VAR=$(yad ...)
and get it in addition to the yad exit code, but now i don't know how to communicate it to the main process after the wait.
Asked by i30817
(197 rep)
Jul 1, 2017, 09:15 AM
Last activity: Jul 1, 2017, 12:02 PM
Last activity: Jul 1, 2017, 12:02 PM