home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / listings / v_09_03 / 9n03049a < prev    next >
Text File  |  1990-12-09  |  565b  |  24 lines

  1. Listing 1 (start.c)
  2. /* ---
  3.    Simple routine to start all the processes 
  4.    for the lidar program. The program starts 
  5.    each routine with a fork call, and then
  6.    terminates.
  7. --- */
  8.  
  9. #include <stdio.h>
  10.  
  11. /* --- process names --- */
  12. static char *tasks[] = { "lidar_acq", 
  13.                "lidar_graph", "lidar_write",
  14.                "lidar_read", NULL};
  15. main ()
  16. {
  17.    int i = 0;
  18.    while (tasks[i] != NULL) {
  19.        if (fork())  /* child, start task */
  20.           execve (tasks[i], NULL, NULL);
  21.        i++;
  22.        }
  23. }                           
  24.