so I have a cgi program in C that calls these lines:
system("./temp.cgi >temp.lis");
system("ls >dir.lis");
system("echo \"hello there you \" > ht.lis");
system("ps -A >ps.lis");
all four lines execute, and create the corresponding .lis files, but temp.lis is empty, it is 0 bytes long. here is the code for temp.cgi:
#!/bin/bash
/opt/vc/bin/vcgencmd measure_temp >temp2.lis
exit
the generated file temp2.lis is also generated, but it is also 0 bytes long.
How can I get temp.cgi to run and generate an output file?