Wireless IP Camera – Part 4: build your own IP camera software

Daemonizing the program is done in motion-detectd.c

Daemonizing is relatively easy and straightforward:

  1. We fork off a new process and obtain a new process id (PID)
  2. The original process is terminated and the new process lives on.
  3. We get a session_id and move to the root dir, close unnecessary file handles
  4. Start our main loop: motion_detect()

That’s all there is to it.

Let’s move on to cross-compiling the program for the bifferboard on the next page…

  • StumbleUpon
  • Facebook
  • Twitter
  • Google Bookmarks
  • email
  • RSS
This entry was posted in Maker Recipes, Security. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">