Under Indian criminal law, there is a provision for anticipatory bail under Section 438 of the Criminal Procedure Code. Law Commission of India in its 41st report recommended to incorporate this provision in procedure code. From Wikipedia
Sukanth Suresh, accused of harassing Megha Madhusoodanan and prompting her to take her life, is now in police custody following the court's decision.