You're right, it doesn't work as we want... but in that environment, srcds attaches to /dev/tty to echo console commands. Strange.
I will have to translate your perl to C :) May be something with pseudoterminals... Alexander Schäfer wrote:
nope that doesn't work. however the buffer is beeing flushed on my system if I kill the process. ( i tried it with and without the underscore for isatty(int fd)...) $ export LD_PRELOAD=./isatty.so $ ./srcds_i686 -game cstrike -nohltv +map de_dust -port 2234 - maxplayers 12 +exec server.cfg 1>test.log 2>&1 & test.log is empty $ killall srcds_i686 test.log is filled with the console output. NOTE that without the overload of isatty the test.log stays empty for me. now the good news for me is that i found a working terminal emulation for perl which works fine with srcds. http://search.cpan.org/~rgiersig/Expect-1.15/ use Expect; sub gg { my $line = shift; #not sure if its a line but who cares, it works :) print $line; } my $exp = Expect->new; $exp->raw_pty(1); $exp->log_file(\&gg); #$exp->debug(2); $exp->log_stdout(0); #dont echo programmdata to our stdout, since we do it ourself up there. $exp->spawn("./srcds_i686","-game cstrike","-nohltv","+map de_dust","- port 2234","-maxplayers 12","+exec server.cfg") or die "Cannot spawn srcds: $!\n"; $exp->expect(undef); still interessted why i have such strange behavior with isatty overload. hf mbalex
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlds_linux