Found cool example of how to avoid line-buffering:

http://faq.cprogramming.com/cgi-bin/smartfaq.cgi?answer=1042856625&id=1043284385

Using this to stop between generations