windows - Spawning multiple copies of a program from C code and redirecting the output to a file -
i working on modifying command-line program written in msdn c , pro*c (oracle pre-compiler write in-line sql , pl/sql statements) multiple copies can spawned , process concurrently. database-heavy program , concurrency issues taken care of on database side, thought easier run multiple copies alter program run multi-threaded. anyway, rely on printf() , output piping write program's output log files debugging purposes. having trouble launching separate copies of exe appropriately write own log files. have played lot exec() , system() functions different copies of exe launch , write logs. closest have gotten work using c line such as: system("start cmd /k call [program commmand , args] > log_file.txt"); this works great - spawns separate command windows , spawns separate copies of program appropriate data-sets. problem command windows stay open after program has finished executing. of our clients run program on scheduler, , having manually close of command windo...