Hello Mr Hutt The reproduction steps you have mentioned for the issue are precisely what we are doing.
I am monitoring killing gmake using ProcessExplorer. I can see that the processes are killed as soon as we issue CTRL_C. However, it is a bit difficult to deduce whether the subprocesses are killed before the files are removed or not. I am not sure how to do such fine-grained debugging. Would you happen to have a suggestion for this. I will be happy to try it out. Also, we tried to track the obj files with ProcMon. Running ProcMon in the background slows the gmake process significantly, due to which we cannot reproduce the issue. Please let me know if you have any pointers. Thanks Anuj -----Original Message----- From: th...@vmware.com [mailto:th...@vmware.com] Sent: Tuesday, March 15, 2016 11:51 AM To: Anuj Shroff <anuj.shr...@mathworks.com> Cc: Eli Zaretskii <e...@gnu.org>; Eric DeCosta <eric.deco...@mathworks.com>; bug-make@gnu.org; Troy Runkel <troy.run...@mathworks.com>; th...@vmware.com Subject: RE: Permission Denied error while killing Gmake on Windows Anuj Shroff writes: > Hello Eli > > Please find a small snippet of process name from ProcessExplorer > > attached. It shows the compiler names and the process name. > > While experiment a bit more with this we found an interesting > workaround > which seems to have given some promising results. > > We tweaked the gmake source code so that when we are deleting > targets > while handling fatal signals (like SIGINT or SIGTERM), if > we encounter an > error we sleep for 3 seconds and retry. > > In our case we are getting the Permission Denied error while > deleting the > obj files. When we used this new gmake, it gave us > good results and we > are no longer seeing the "deleting files: > Permission Denied" error. Also the corrupt obj files (due to the > > interrupt) are cleaned up properly. > > We would like to know your opinion on this. If I understand things correctly, you are doing this: o Starting gmake o <gmake starts a bunch of compilation subprocesses> o Send Ctrl-C to gmake o gmake removes object files when it received Ctrl-C. On Windows, you will get a 'Permission Denied' when attempting to delete a file if another process has it open. Have all the subprocesses of gmake been fully killed before attempting to remove files? -- For more information, dial 411. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make