c - 系统调用重启和魔数(Magic Number)

标签 c ubuntu-10.04 system-calls

Possible Duplicate:
Magic numbers of the Linux reboot() system call

我在面试时被问到这个问题

When using the Linux-specific reboot() system call to reboot the system, the second argument, magic2, must be specified as one of a set of magic numbers (e.g., LINUX_REBOOT_MAGIC2). What is the significance of these numbers?

上述问题的正确答案是什么?

最佳答案

允许的 magic2 数字集的重要性在于,当以十六进制表示时,它们代表出生日期(特别是 Linus Torvalds 和他的三个 child 的出生日期)。

确实降低了愚蠢面试问题的阈值!

关于c - 系统调用重启和魔数(Magic Number),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5386352/

相关文章:

c++ - Ubuntu 中 cmake 和 OpenCV 2.0 的问题

Python 守护进程不会在 Ubuntu 的后台运行

python - 如何在 Ubuntu 10.04 上为 python 3 安装 pycairo

c++ - msgrcv 不等待带有错误号 22 (EINVAL) 的特定消息类型的消息

c - 为什么连续写入会在缓冲区中保留4K字节?

c - send - recv 无法按预期使用命令行参数

c++ - C/C++ 应用程序的新手设计注意事项

c - 当线程卡在 64 位主机上的 syscall 32 位程序中时进行调试

检查数字是否为 2 的幂,以及输入是否为数字

c - 警告 : [-Wformat=] and strcmp() not comparing in C