P.S. Thank you for such quick reply. Maybe execve should be solution? In the beginnig of program (when it's not so big, most of memory goes throught malloc later) i will create executable *.sh file in which later i just will write and execute my command via execve?