qubes.WaitForSession 245 B

12345
  1. #!/bin/sh
  2. read USERNAME
  3. su -c 'echo $$ >> /tmp/qubes-session-waiter; [ ! -f /tmp/qubes-session-env ] && exec sleep inf' - "$USERNAME" 2> /dev/null
  4. # the above line is _expected_ to be terminated by a signal, don't treat this as a failure
  5. exit 0