0

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

I was asked this question in an interview

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?

What is the correct answer to the above question?

Community
  • 1
  • 1
Registered User
  • 5,173
  • 16
  • 47
  • 73

1 Answers1

0

The significance of the allowed set of magic2 numbers is that, when expressed in hexadecimal, they represent dates-of-birth (specifically, of Linus Torvalds and his three children).

This really lowers the bar on silly interview questions!

caf
  • 233,326
  • 40
  • 323
  • 462
  • I really wonder if the interviewer wasn't trying to get at the point that the syscall uses magic numbers (their value doesn't matter so much) so that when testing asm that makes syscalls as root you don't accidentally reboot the machine. :-) – R.. GitHub STOP HELPING ICE Mar 22 '11 at 04:09