1 |
One of my ebuilds is using virtualx eclass, and I noticed the following |
2 |
code inside the eclass: |
3 |
|
4 |
retval=$? |
5 |
|
6 |
# Now kill Xvfb |
7 |
kill $(cat /tmp/.X${XDISPLAY}-lock) |
8 |
else |
9 |
debug-print "${FUNCNAME}: attaching to running X display" |
10 |
# Normal make if we can connect to an X display |
11 |
debug-print "${FUNCNAME}: ${VIRTUALX_COMMAND} \"$@\"" |
12 |
${VIRTUALX_COMMAND} "$@" |
13 |
retval=$? |
14 |
fi |
15 |
|
16 |
# die if our command failed |
17 |
[[ $? -ne 0 ]] && die "${FUNCNAME}: the ${VIRTALX_COMMAND} failed." |
18 |
|
19 |
Shouldn't that last line look more like this (notice $retval instead of $?): |
20 |
|
21 |
[[ $retval -ne 0 ]] && die "${FUNCNAME}: the ${VIRTALX_COMMAND} failed." |
22 |
|
23 |
What do you think? |