aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-06-04 12:08:47 +0200
committerSverker Eriksson <[email protected]>2013-06-04 12:08:47 +0200
commit2e28220023dbcc5e0a8062ce289809ff1df17106 (patch)
tree579a2ed16bbb80053e0e244ce171c12265056629 /erts
parent2a0c4c3f327eb0e8635e3a835b91c3819281bf28 (diff)
parentd68c8177e7893e2a2f37cd8ecd17b0ff6f2acd57 (diff)
downloadotp-2e28220023dbcc5e0a8062ce289809ff1df17106.tar.gz
otp-2e28220023dbcc5e0a8062ce289809ff1df17106.tar.bz2
otp-2e28220023dbcc5e0a8062ce289809ff1df17106.zip
Merge branch 'sverk/core-chmodding' into maint
* sverk/core-chmodding: system: Prevent z_SUITE from changing the timestamp on core files
Diffstat (limited to 'erts')
-rw-r--r--erts/test/z_SUITE.erl9
1 files changed, 7 insertions, 2 deletions
diff --git a/erts/test/z_SUITE.erl b/erts/test/z_SUITE.erl
index 78968ed405..9abc73c081 100644
--- a/erts/test/z_SUITE.erl
+++ b/erts/test/z_SUITE.erl
@@ -190,8 +190,13 @@ file_inspect(#core_search_conf{file = File}, Core) ->
probably_a_core
end.
-mk_readable(F) ->
- catch file:write_file_info(F, #file_info{mode = 8#00444}).
+mk_readable(F) ->
+ try
+ {ok, Old} = file:read_file_info(F),
+ file:write_file_info(F, Old#file_info{mode = 8#00444})
+ catch
+ _:_ -> io:format("Failed to \"chmod\" core file ~p\n", [F])
+ end.
ignore_core(C) ->
filelib:is_regular(filename:join([filename:dirname(C),