test_server minor bug+patch
Samuel Rivas
samuel@REDACTED
Wed Mar 29 13:50:36 CEST 2006
Hi,
There is a bug in test_sever that prevents test_sever:call_crash/3 from
working properly (or working at all :).
I've attached a correcting patch.
Regards
--
Samuel
-------------- next part --------------
--- otp_src_R10B-10/lib/test_server/src/test_server_sup.erl 2006-03-29 13:32:56.000000000 +0200
+++ otp_src_R10B-10.patched/lib/test_server/src/test_server_sup.erl 2006-03-29 13:39:20.000000000 +0200
@@ -128,12 +128,16 @@
exit({wrong_crash_reason,Reason});
{'EXIT',OtherPid,Reason} when OldTrapExit == false ->
exit({'EXIT',OtherPid,Reason})
- after trunc(Time) ->
+ after safe_trunc(Time) ->
exit(call_crash_timeout)
end,
process_flag(trap_exit,OldTrapExit),
Answer.
+safe_trunc(infinity) ->
+ infinity;
+safe_trunc(N) ->
+ trunc(N).
More information about the erlang-questions
mailing list