Earnestly / sx

Start an xorg server
MIT License
231 stars 16 forks source link

Are the `exec`s and the wait for the client (sxrc) really necessary? #25

Closed tomty89 closed 3 years ago

tomty89 commented 3 years ago

Hi. It's me again. I hope I'm not bugging you.

Just in case I missed a chance to learn more, I read sx again and realize that I don't quite understand why we need to wait for the client process.

I tested it a bit myself. It seems that the wait is for some reason necessary if exec is used. Then I find the fact that exec (in both the client and the server case) is used is actually strange to me as well, because they are both forked.

What would be the potential pitfall(s) when it is done with:

...
trap 'DISPLAY=:$tty "${@:-$cfgdir/sxrc}" &' USR1

(trap '' USR1 && Xorg :"$tty" -keeptty vt"$tty" -noreset -auth "$XAUTHORITY") & pid=$!
...

?

Earnestly commented 3 years ago

Not the place.