Say I'm running a C program via
15 11 * * * time /home/philip/school/a1_c_program.c > /home/philip/logs/time2execute.txt
But the C program requires the user to enter some text.
What happens in this situation? Does the C script just remain an open process on my machine until I restart? Or does it automatically close after some time?
If I could attach to the process and enter the required text would the time command finish running and print something to the newly created text file?
I noticed with my above cronjob the
time2execute.txt file is created but is empty.
Edit: Once I fixed my crontab to point to the compiled c program instead of the source file. The text file included the prompt text that the user would seen.