@@ -533,8 +533,8 @@ code_permission(_Config) ->
533533 Tester ! {self (), unlocked }
534534 end ,
535535 Locker1 = spawn_link (LockerFun ),
536- {Locker2 , MRef2 } = spawn_monitor (LockerFun ),
537- {Locker3 , MRef3 } = spawn_monitor (LockerFun ),
536+ {Locker2 , MRef2 } = spawn_opt (LockerFun ,[ link , monitor ] ),
537+ {Locker3 , MRef3 } = spawn_opt (LockerFun ,[ link , monitor ] ),
538538 Locker4 = spawn_link (LockerFun ),
539539 Locker5 = spawn_link (LockerFun ),
540540
@@ -560,13 +560,15 @@ code_permission(_Config) ->
560560 wait_suspended (Locker5 ),
561561
562562 % % Test killing process waiting in queue
563+ unlink (Locker3 ),
563564 exit_signal (Locker3 , kill ),
564565 {'DOWN' , MRef3 , process , Locker3 , killed } = receive_any (),
565566
566567 Locker1 ! unlock ,
567568 {Locker1 , unlocked } = receive_any (),
568569
569570 % % Test killing process after lock handover but before getting scheduled
571+ unlink (Locker2 ),
570572 exit_signal (Locker2 , kill ),
571573 receive {'DOWN' , MRef2 , process , Locker2 , killed } -> ok end ,
572574
@@ -1611,4 +1613,7 @@ run_sys_proc_test(Test, Config) ->
16111613 end .
16121614
16131615receive_any () ->
1614- receive M -> M end .
1616+ receive M -> M
1617+ after 10_000 ->
1618+ ct :fail ({timeout , receive_any })
1619+ end .
0 commit comments