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
On 24.07.2005, at 22:49, Mario Benito Ríos wrote:
You gave me a good clue.
Try this:
http://www.unixlabplus.com/unix-prog/isatty/isatty.c
but remove the underscore from _isatty.
It really works. srcds thinks it's attached to a tty.
Alexander Schäfer wrote:
nohup works!!!!! at least it can redirect input without buffering the
stuff. now I'm going to analyze the sourcecode. (I'm not good in C
though)
nohup ./srcds_i686 -game cstrike -nohltv +map de_dust -port 2234 -
maxplayers 12
nohup successfully puts data into nohup.out without buffering. (it
somehow redirects tty output + stdout).
hf mbalex
_______________________________________________
To unsubscribe, edit your list preferences, or view the list
archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux
_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please
visit:
http://list.valvesoftware.com/mailman/listinfo/hlds_linux