diff options
author | Björn-Egil Dahlberg <[email protected]> | 2010-12-02 15:55:51 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2010-12-02 15:55:51 +0100 |
commit | 9def7dccb600818e0b3971a3ec1692247a3eefe3 (patch) | |
tree | d6a6b2b085c505bb61e2c909de202f83c851bc43 | |
parent | 4c24c029fbd5263e3dc0ce0d4a23574a05c9bbc3 (diff) | |
parent | b79e6bea522bcf7b8f5722970e6fe450e866984c (diff) | |
download | otp-9def7dccb600818e0b3971a3ec1692247a3eefe3.tar.gz otp-9def7dccb600818e0b3971a3ec1692247a3eefe3.tar.bz2 otp-9def7dccb600818e0b3971a3ec1692247a3eefe3.zip |
Merge branch 'kenneth/asn1/driver_handler_race/OTP-8948' into dev
* kenneth/asn1/driver_handler_race/OTP-8948:
Correct a race-condition during loading of driver
-rw-r--r-- | lib/asn1/src/asn1rt_driver_handler.erl | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/asn1/src/asn1rt_driver_handler.erl b/lib/asn1/src/asn1rt_driver_handler.erl index c95b243ae0..cc2b501e16 100644 --- a/lib/asn1/src/asn1rt_driver_handler.erl +++ b/lib/asn1/src/asn1rt_driver_handler.erl @@ -71,7 +71,10 @@ load_driver(Reason) -> end. init(FromPid,FromRef) -> - register(asn1_driver_owner,self()), + case catch register(asn1_driver_owner,self()) of + true -> true; + _Other -> exit(normal) + end, Dir = filename:join([code:priv_dir(asn1),"lib"]), case catch erl_ddll:load_driver(Dir,asn1_erl_drv) of ok -> |