Skip to content
Snippets Groups Projects
Commit ac5611be authored by Simon Rose's avatar Simon Rose
Browse files

Small fix for weird buffering issue

This seems to be a very specific, limited issue, affecting virtualbox VMs only. There appears to
be an issue with how append data is buffered and written to disk. You can see this with the
following commands:

```console
$ rm -f out.tmp && seq 1569 >> out.tmp && ls -l out.tmp
-rw-r--r-- 1 simonrose vagrant 8188 Feb 14 12:12 se.tmp
$ rm -f out.tmp && seq 1560 >> out.tmp && ls -l out.tmp
-rw-r--r-- 1 simonrose vagrant 8192 Feb 14 12:12 se.tmp
$ rm -f out.tmp && seq 9999 >> out.tmp && ls -l out.tmp
-rw-r--r-- 1 simonrose vagrant 8192 Feb 14 12:12 se.tmp
```
Note that the last two files are the same size, when they should clearly be quite different. If we
remove the `>>` and replace it with a `>`, then all works correctly:
```console
$ rm -f out.tmp && seq 9999 > out.tmp && ls -l out.tmp
-rw-r--r-- 1 simonrose vagrant 48888 Feb 14 13:14 out.tmp
```
Note the file size in this case.
parent 9b692d59
No related branches found
No related tags found
No related merge requests found
...@@ -868,7 +868,7 @@ ${DEPFILE}: ${LIBOBJS} $(USERMAKEFILE) ...@@ -868,7 +868,7 @@ ${DEPFILE}: ${LIBOBJS} $(USERMAKEFILE)
$(RM) $@.tmp $(RM) $@.tmp
@echo "# Generated file. Do not edit." > $@ @echo "# Generated file. Do not edit." > $@
# Check dependencies on other module headers. # Check dependencies on other module headers.
cat *.d 2>/dev/null | sed 's/ /\n/g' | grep -v '$(EPICS_BASE)/include' | sed -n '$(DEP_PARSER)' >> $@.tmp cat *.d 2>/dev/null | sed 's/ /\n/g' | grep -v '$(EPICS_BASE)/include' | sed -n '$(DEP_PARSER)' > $@.tmp
# Manully added dependencies: ${REQ} # Manully added dependencies: ${REQ}
@$(foreach m,${REQ},echo "$m $(or $(and $(or $(wildcard $(EPICS_MODULES)/$m/$($m_VERSION)),$(wildcard $(E3_SITEMODS_PATH)/$m/$($m_VERSION))),$($m_VERSION)),$(error REQUIRED module '$m' version '$($m_VERSION)' does not exist))" >> $@.tmp;) @$(foreach m,${REQ},echo "$m $(or $(and $(or $(wildcard $(EPICS_MODULES)/$m/$($m_VERSION)),$(wildcard $(E3_SITEMODS_PATH)/$m/$($m_VERSION))),$($m_VERSION)),$(error REQUIRED module '$m' version '$($m_VERSION)' does not exist))" >> $@.tmp;)
cat $@.tmp | sort -u >> $@ cat $@.tmp | sort -u >> $@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment