Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15002
| Path | csiph.com!goblin3!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Paulo Nogueira <paulo@cefema-gt.ist.utl.pt> |
| Newsgroups | gnu.bash.bug |
| Subject | problem with bash script loading |
| Date | Sat, 29 Dec 2018 12:09:49 +0000 (WET) |
| Lines | 72 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.6519.1546090995.1284.bug-bash@gnu.org> (permalink) |
| Reply-To | paulo.nogueira@tecnico.ulisboa.pt |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; format=flowed; charset=US-ASCII |
| X-Trace | usenet.stanford.edu 1546090995 21523 208.118.235.17 (29 Dec 2018 13:43:15 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| User-Agent | Alpine 2.21 (LFD 202 2017-01-01) |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] |
| X-Received-From | 193.136.161.26 |
| X-Mailman-Approved-At | Sat, 29 Dec 2018 08:43:13 -0500 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash/> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:15002 |
Show key headers only | View raw
Bash Version: 4.4 Patch Level: 19 Release Status: release Configuration Information: Machine: x86_64 OS: linux-gnu Compiler: gcc Description: I've come to the conclusion that bash scripts (1) are not entirely loaded in memory at once or, at least, (2) are re-read (from the disk?) if the file is updated Something tells me this is a really bad idea (if it turns out to be a "feature" and not a bug), because if a script is launched with "&" and then the file is edited/updated, the result will be unpredictable. Repeat-By: Create an empty directory, and then two script files s1 and s2, contents given below (enclosed by '--') s1: -- #!/bin/bash # sleep 3 # \rm -f f1 # exit # -- s2: -- #!/bin/bash # sleep 1 # \rm -f f2 # exit # -- Now execute # touch f1 f2 # ( ./s1 & ) ; sleep 1 ; \cp -f s2 s1 and see f2 disappear, not f1 . Best regards, Paulo Nogueira
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
problem with bash script loading Paulo Nogueira <paulo@cefema-gt.ist.utl.pt> - 2018-12-29 12:09 +0000
csiph-web