Hi,
I figured out a way to restart Xorg through script. It might be an unhealthy method, but it server my purpose. The problem is that we dont have the control over the next line of the script when Xorg is killed , so that we restart the Xorg. The trick i used is that, i launched a script in the background before killing Xorg. This scripts if in while loop and checks if Xorg is killed. As soon as it is killed, it launches the Xorg again and exits.
This way, i was able to simulate the restart of Xorg after resolution change.