diff --git a/firestarter b/firestarter index 957b9e4..1dce433 100755 --- a/firestarter +++ b/firestarter @@ -324,11 +324,12 @@ step_postexecute() { step_wait() { [ -n "$_optdryrun" ] && exit 0 trap step_logout EXIT - if [ -n "$FS_DIEONWM" ] && gettarget "$_optconfigdir/wm" && has readlink "$_return"; then - target="$(command -v "$_return")" + log "Checking for window manager" 2 + if [ -n "$FS_DIEONWM" ] && gettarget "$_optconfigdir/wm"; then + target="$_return" for job in $(jobs -p); do - if [ "$target" = "$(readlink /proc/$job/exe)" ]; then - log "Waiting for WM to exit: \"$_return\"" + if [ "$target" = "$(cat /proc/$job/cmdline)" ]; then + log "Waiting for WM to exit: \"$target\"" wait "$job" exit 0 fi