Fix confetty race condition induced by wcons

wcons was leaving a common control socket defined for all invocations
of confetty.  Fix this by not setting a socket for any but the first.
The channel is currently only used for wcons initial tiling, so
it should only be bothered with for that anyway.
This commit is contained in:
jjohnson2 2015-01-30 14:25:08 -05:00
parent 7647a67a71
commit a5bc39556c

View File

@ -105,6 +105,7 @@ if (defined($tilefact)) {
$ENV{CONSCONTROLPATH} = "/tmp/wconscontrol.$firstnode.$$";
system("xterm $xrm -bg black -fg white -title $firstnode -n $firstnode -geometry +0+0 ".join(" ",@ARGV)." -e /bin/bash -c \"$mydir/xtcd.pl ".$ENV{DISPLAY}." $firstnode $firstnode & let SDATE=`date +%s`+5; $mydir/rcons $firstnode ".$conservers{$firstnode}."; if [ \\\$SDATE -gt \\`date +%s\\` ]; then echo Press enter to close; read SDATE; fi \" &");
$ENV{CONSCONTROLPATH} = "";
my $remainwait = 2;
while (not -S "/tmp/wconscontrol.$firstnode.$$" and $remainwait > 0) {
sleep(0.1);