Merge branch 'master' of git://git.verplant.org/sort-networks
authorFlorian Forster <sifnfors@false.(none)>
Sat, 10 May 2008 09:03:13 +0000 (11:03 +0200)
committerFlorian Forster <sifnfors@false.(none)>
Sat, 10 May 2008 09:03:13 +0000 (11:03 +0200)
1  2 
src/sn-evolution.c

diff --combined src/sn-evolution.c
@@@ -205,13 -205,7 +205,7 @@@ static int create_offspring (void
    assert (SN_NETWORK_INPUT_NUM (n) == inputs_num);
  
    if (sn_bounded_random (0, 100) <= 1)
-   {
-     int status;
-     status = mutate_network (n);
-     if (status == 0)
-       printf ("Debug: Mutation successfull.\n");
-   }
+     mutate_network (n);
  
    sn_population_push (population, n);
  
@@@ -280,7 -274,6 +274,7 @@@ static int evolution_start (int threads
  int main (int argc, char **argv)
  {
    struct sigaction sigint_action;
 +  struct sigaction sigterm_action;
  
    read_options (argc, argv);
    if (initial_input_file == NULL)
    sigint_action.sa_handler = sigint_handler;
    sigaction (SIGINT, &sigint_action, NULL);
  
 +  memset (&sigterm_action, '\0', sizeof (sigterm_action));
 +  sigterm_action.sa_handler = sigint_handler;
 +  sigaction (SIGTERM, &sigterm_action, NULL);
 +
    population = sn_population_create (max_population_size);
    if (population == NULL)
    {