yellowman / nsh

OpenBSD networking configuration shell
http://www.nmedia.net/nsh/
Other
177 stars 27 forks source link

fix crash when running reboot and halt #19

Closed muhammadn closed 8 years ago

muhammadn commented 8 years ago

nsh will not properly run halt and reboot which results in crash upon running 'halt' and 'reboot'.

yellowman commented 8 years ago

I don't see how this is an actual crash, but the return value may indicate failure, so I agree, that should be fixed...

yellowman commented 8 years ago

So, the crash of various daemons was the improper use of reboot(). As it turns out, nsh is expected to emulate the OS' set of actions that gracefully terminate daemons if you are running those daemons. Thererfore now nsh just calls /bin/halt or /bin/reboot.