Sure, easy enough loop around looking at the return value from unlink, sleeping for 0.1 sec and trying again if unlink fails. There still should be some maximum amount of time to try before giving up. Do you think 3 seconds is too long in that case?
-Eric > -----Original Message----- > From: Eli Zaretskii [mailto:e...@gnu.org] > Sent: Tuesday, March 15, 2016 1:31 PM > To: Anuj Shroff <anuj.shr...@mathworks.com> > Cc: bug-make@gnu.org; Eric DeCosta <eric.deco...@mathworks.com>; Troy > Runkel <troy.run...@mathworks.com> > Subject: Re: Permission Denied error while killing Gmake on Windows > > > From: Anuj Shroff <anuj.shr...@mathworks.com> > > CC: "bug-make@gnu.org" <bug-make@gnu.org>, > > Eric DeCosta > > <eric.deco...@mathworks.com>, > > Troy Runkel <troy.run...@mathworks.com> > > Date: Tue, 15 Mar 2016 15:39:00 +0000 > > > > 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. > > 3 seconds of wait is way too long, IMO. _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make