bugmake - Bugs: bug #53568, GNU Make sometime doesn't reliably...

 
 

bug #53568: GNU Make sometime doesn't reliably remove target file on being interrupted.

Submitter:  None
Submitted:  Thu 05 Apr 2018 08:24:35 PM UTC
   
 
Severity:  3 - Normal Item Group:  Bug
Status:  None Privacy:  Public
Assigned to:  None Open/Closed:  Open
Component Version:  4.2.1 Operating System:  MS Windows
Fixed Release:  None Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 05 Apr 2018 08:24:35 PM UTC, original submission:  

This is a document describing the expected behaviour: https://www.gnu.org/software/make/manual/html_node/Interrupts.html(url)

However, in rare case (I still can't tell, but I think it relates to resource locking), make doesn't remove target file when being interrupted.

With my example makefile:



all: foo

foo:
while true; do echo bar >> foo; cat foo > /dev/null ; done



Try run `make`, then CTRL+C at anytime. There will be messages:



make: *** Deleting file 'foo'
make: *** [Makefile:4: foo] Interrupt



Sometime, the file 'foo' is still there. I tried running with --debug=all, there was nothing special when the 'foo' stayed. This silently result in an incomplete file which is not straight forward to see in a large project in real use.

I can reproduce in my two machine.
This is my main setup (this one produce the problem more frequent):



$ make --version
GNU Make 4.2.1
Built for i686-pc-msys
$ uname -a
MSYS_NT-6.1 MYNAME3950 2.9.0(0.318/5/3) 2017-09-13 23:42 i686 Msys



This is my second setup:



$ gmake --version
GNU Make 4.2.1
Built for x86_64-apple-darwin13.4.0
$ uname -a
Darwin Purr.local 13.4.0 Darwin Kernel Version 13.4.0: Mon Jan 11 18:17:34 PST 2016; root:xnu-2422.115.15~1/RELEASE_X86_64 x86_64



Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by sleepyfurious
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-04-05 sleepyfurious Carbon-Copy- Added sleepyfurious

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code