Check out example codes for "command to perform safe shutdown in unix". It will help you in understanding the concepts better.

Code Example 1

shutdown -

Learn ReactJs, React Native from akashmittal.com