Thanks, but I already tried that before. Even a fully colored prompt misbehaves.
Type: Posts; User: rfk
Thanks, but I already tried that before. Even a fully colored prompt misbehaves.
You are right. This only happens when using a colored command line:
//input = readline("cli> "); // Works
input = readline("\033[1;37mcli>\033[0m "); // Works not
Hrm.
Hey there. I implemented a small command line interpreter using the GNU readline library. This works really nice except for lines having much text input. As soon as the user reaches the console width...
Ah, that was the issue! Even with or without the free() call the memory was never fully released. Thanks for your answer!
Using detached POSIX threads I recognized that they leak memory. I've searched for a long time but most answers told me to use either pthread_join() or pthread_detach(). Of course I've tried both...