When I run the following
make command in a build directory it's almost empty (file in question is absolutely certainly not there)
strace -f -e trace=execve,vfork,open,creat -s 1024 make <target>
After it finishes, the file is totally there. So it must have been created by
make or one of its child processes (or children of their children and so on).
However when I grep the
strace log for either the name of the file or for
creat I cannot find the system call responsible for creation of this file.
What am I missing? Are there other system calls I should be monitoring?
It turns out the mistake was in both my strace comamnd and my grepping. All the answers were helpful, thank you, everyone, for your time.
I actually failed to communicate that the file was in a subdir and I was grepping using the name of a file along with the subdir's name. But since strace does not provide info on current working directory this approach didn't work so well (I ended up stracing
rename calls to get the desired effect).
So PaulHaldane's first suggestion was right and to the point. As well as larsks's answer in which he has actually guessed how the file got created.