[ts-gen] redirecting shim output to python script

Nils Gebhardt mail at ngebhardt.de
Tue May 26 16:25:49 EDT 2009




Hi there,

> 
> In brief: It seems that with the popen approach, the shim always
> accepts the first command sent on stdin (i.e line buffered?), but thereafter appears
> to want either a complete 4096 characters *or* a delay between commands being sent. 

yet another popen approach: 
I have small C program spawning a shim process with popen and reading
shim commands from a fifo in a select loop as some sort of a 'shim
server'. The reason is that I have small programs firing limit orders at
random times and I want to catch all corresponding fill messages at
obviously not predetermined points in time. So far I didn't find a
better way, but it works. I also found that I need to insert some short
sleep intervals. What confuses me is the fact that the shim process eats
quite a bit of memory.To be more precise, about 1-2 GB til the end of
the day. The shim process is opened by popen("...", "w"), appears as
"shim --risk file save", receives a small 2-digit number of commands
during its lifetime and the log/Shim file keeps a factor about 1000
below memory usage. 
Has anybody observed similar usage in memory?


regards

Nils





More information about the ts-general mailing list