-1

I'm doing sw development in an environment based on Cygwin. Using standard make etc that ships with Cygwin running on Windows 7.

A few days ago I discovered that I had ~ 650 000 temporary files of size 0. The name of these files matched the standard pattern for mktemp. mktemp is used in a few cases in shell scripts that might be processed during the build,so I went looking for a missing removal of a file created with mktemp but didn't find any. Finally I discovered that just invoking make on an existing build that is up to date (hence make doesn't do anything) leaves 7 of these temporary files after make completes.

I tried with Process Monitor from sysinternals and found that yes, these files are actually created by mktemp. However the stack trace from Process Monitor goes directly into cygwin1.dll at location setpassent + 0x221c and then continues up into the OS (Windows 7). I had expected the stack to include bash, make or any other tool used in the build, but no.

Anyone who has experience a similar situation and found a solution? Any hints or ideas on how I can proceed in the search for who's creating those temporary files? It does affect performance of the workstations of the developers so it must be solved. I'm reluctant to add a generic clean since that might affect temporary files that shouldn't bet deleted yet. Any advice appreciated!

user2052153
  • 129
  • 10
  • Just for the record with *many* make setups it isn't true to state that "make doesn't do anything" for a fully up to date built directory. It *should* be true but many make setups are not written correctly. – Etan Reisner Dec 17 '14 at 16:30
  • I would try `strace` to see if you can figure out what is running mktemp. – Etan Reisner Dec 17 '14 at 16:31
  • You were both right. make did run some scripts due to $(shell expressions and strace was great for tracking it down. – user2052153 Dec 17 '14 at 17:48

1 Answers1

-1

(Question answered in the comments. See Question with no answers, but issue solved in the comments (or extended in chat) )

@Etan Reisner wrote:

Just for the record with many make setups it isn't true to state that "make doesn't do anything" for a fully up to date built directory. It should be true but many make setups are not written correctly.

I would try straceto see if you can figure out what is running mktemp.

The OP wrote:

You were both right. make did run some scripts due to $(shell expressions and strace was great for tracking it down.

Community
  • 1
  • 1
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129