[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Permission Denied error while killing Gmake on Windows

From: Eli Zaretskii
Subject: Re: Permission Denied error while killing Gmake on Windows
Date: Thu, 25 Feb 2016 18:52:32 +0200

> From: Anuj Shroff <address@hidden>
> Date: Wed, 24 Feb 2016 21:11:02 +0000
> Cc: Eric DeCosta <address@hidden>,
>       Troy Runkel <address@hidden>
> Our aim is to kill the gmake process along with its sub gmakes (child 
> processes) on windows and clean up
> properly (which involves unlinking object files).
> For this we created a script which would send a ‘CTRL + C’ event to the main 
> gmake process using
> win32::API of Perl. When we monitor the progress, the main gmake and child 
> gmakes are killed properly. We
> see that the correct signal is being propagated to the gmake process. 
> However, the cleanup is not happening
> as expected. When it tries to unlink all these “obj” files, it gives a 
> Permission denied error. 
> To understand more about it we read the source code. We found that while 
> handling 'CTRL + C' signal gmake
> suspends its main thread. While the main thread is suspended, it tries to 
> kill the child processes and clean up
> the files. While the files (mainly obj files) are being cleaned up (unlinked) 
> we get the Permission denied issue
> as the file seems to have a lock on it. We suspect that this lock is detected 
> by the filer that the file is still in use
> by the compiler which is the main thread.

The compiler is a separate program, so it shouldn't matter whether the
cleanup is done from the main thread of gmake or from another thread.
If the compiler has the file open, deleting it will fail, and there's
nothing gmake can do about that.  However, the files are cleaned up
after the compiler is killed, so the file should not be open anymore.
So I'm unsure why you see these problems

What compiler are you running under gmake?

> Hence, it gives a Permission Denied error. As the file is on the
> network filer this issue is much more prominent. However, when these files 
> are created on the local drive
> these issues are much less visible (Not completely gone but less). 

I never saw such problems in local drives.  Never.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]