I cannot understand why you do not want to create a new process, but if you really do not want it, then it execve("reboot",0,0)will start reboot, replacing the current process. You need to enable it <unistd.h>.
I guess this is available on Mac OS; It should be on all POSIX platforms.
UPDATE
, Mac OS reboot. reboot(RB_AUTOBOOT); , . . .