[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #62145] Unlink the stdin temporary file on failure to re-execute.
From: |
Dmitry Goncharov |
Subject: |
[bug #62145] Unlink the stdin temporary file on failure to re-execute. |
Date: |
Sun, 6 Mar 2022 14:36:18 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?62145>
Summary: Unlink the stdin temporary file on failure to
re-execute.
Project: make
Submitted by: dgoncharov
Submitted on: Sun 06 Mar 2022 07:36:16 PM UTC
Severity: 3 - Normal
Item Group: Bug
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Component Version: SCM
Operating System: POSIX-Based
Fixed Release: None
Triage Status: None
_______________________________________________________
Details:
Make creates a temporary file to store the make code read from stdin.
If make needs to re-execute itself and this attempt to re-execute fails, make
neglects to unlink the temporary file.
++++
$ cat makefile
def:; $(info hello world)
$(MAKE_RESTARTS)makefile: force; touch $@ && chmod -x $(MAKE)
force::
$ echo 'all: $(info hello)' | ./make -Rd -f makefile -f-
GNU Make 4.3.90
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Reading makefiles...
Reading makefile 'makefile'...
Reading makefile '/tmp/GmjNbYoy'...
hello
Updating makefiles....
Considering target file 'makefile'.
Considering target file 'force'.
File 'force' does not exist.
Looking for an implicit rule for 'force'.
No implicit rule found for 'force'.
Finished prerequisites of target file 'force'.
Target 'force' is double-colon and has no prerequisites.
Must remake target 'force'.
Successfully remade target file 'force'.
Finished prerequisites of target file 'makefile'.
Prerequisite 'force' of target 'makefile' does not exist.
Must remake target 'makefile'.
makefile:2: update target 'makefile' due to: force
touch makefile && chmod -x /tmp/test/./make
Putting child 0x55abdef52870 (makefile) PID 3695 on the chain.
Live child 0x55abdef52870 (makefile) PID 3695
Reaping winning child 0x55abdef52870 PID 3695
Removing child 0x55abdef52870 PID 3695 from chain.
Successfully remade target file 'makefile'.
Considering target file '/tmp/GmjNbYoy'.
File '/tmp/GmjNbYoy' was considered already.
Re-executing[1]: /tmp/test/./make -Rd -f makefile --temp-stdin=/tmp/GmjNbYoy
make: /tmp/test/./make: Permission denied
$ ls /tmp/GmjNbYoy
/tmp/GmjNbYoy
----
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?62145>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [bug #62145] Unlink the stdin temporary file on failure to re-execute.,
Dmitry Goncharov <=