Multiple choice technology programming languages

6.) How do I get my program to act like a daemon?

  1. a) Run with root user

  2. b) Run with &

  3. c) Run with root user using &

  4. d) None

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

To make a program act like a daemon, it must perform specific system operations such as calling fork(), exiting the parent, calling setsid(), and closing standard file descriptors. Simply running with root or & is insufficient.