I need to make a tmp file per each interation in a loop due to calling an external tool and storing its return values in a CSV file so I'm using:
if((fd = mkstemp(outfile))< 0)
fprintf(stderr, "\nFailed to create temporary file to write tmp output!\n");
however, it works only for the 1st iteration. For the 2nd itermation it prints the above message and quits.
Is there any limitation for this function?
Your help is appreciated.