TerminationTrigger fails if the termination file cannot be created

Issue #1456 closed
Ian Hinder created an issue

In TerminationTrigger file.c, there is this code:

file = fopen (get_termination_file(), "w"); fclose (file);

This leads to a segmentation fault if the file cannot be created, e.g. due to a missing directory in the path (for example if the parameter file has been copied from another cluster and uses an absolute path). I would add an error check here to abort if file == 0, but wanted to check that this was the right thing to do.

Keyword:

Comments (4)

  1. Erik Schnetter
    • removed comment

    Yes, this is correct since the current behaviour (segfault) also aborts, and since the user explicitly requested that a termination file should be created.

  2. Log in to comment