Magic numbers of the Linux reboot() system call

后端 未结 2 1858
猫巷女王i
猫巷女王i 2020-12-22 23:23

The Linux Programming Interface has an exercise in Chapter 3 that goes like this:

When using the Linux-specific reboot() system call to reboot the s

相关标签:
2条回答
  • 2020-12-22 23:57

    It's the birthday of Linus Torvalds (The developer of the Linux kernel and the Git version control) and his 3 daughters. works as magic numbers to reboot the system.

    http://en.wikipedia.org/wiki/Linus_Torvalds

    0 讨论(0)
  • 2020-12-23 00:12

    Just a guess, but those numbers look more interesting in hex:

    672274793 = 0x28121969
     85072278 = 0x05121996
    369367448 = 0x16041998
    537993216 = 0x20112000
    

    Developers' or developers' children's birthdays?

    Regarding finding the syscall implementation, I did a git grep -n LINUX_REBOOT_MAGIC2 and found the definition in kernel/sys.c. The symbol sys_reboot is generated by the SYSCALL_DEFINE4(reboot, ... gubbins, I suspect.

    0 讨论(0)
提交回复
热议问题