glibc - double free or corruption error on system() call in Linux
I've searched through the boards, but have found nothing to help with this problem. I'm writing a program in c++ using Qt in linux, and when a box is checked I want it to run a bash script. I'm using the system("[script]") syntax. Even when I do something as basic as system("echo hello"); the program crashes with "*** glibc detected *** ./[program name] : double free or corruption (fasttop): [mem addr]" followed by a memory dump.
I've tried calling it from my main thread and from my QThread class, and no luck. I've cleaned and recompiled, nothing. Why won't my linux system() call work at all?
Thanks in advance.
Re: glibc - double free or corruption error on system() call in Linux
Hi, have you seen QProcess for calling other command line executables?
Re: glibc - double free or corruption error on system() call in Linux
Ah, thank you, no I had not :)
I'll try it and ask if it doesn't work...
Thanks!
Re: glibc - double free or corruption error on system() call in Linux
Awesome solution, thanks. Works like a charm.