aboutsummaryrefslogtreecommitdiff
path: root/src/gui_backend_slurm.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2020-08-28 13:47:56 +0200
committerThomas White <taw@physics.org>2020-08-28 13:49:55 +0200
commit36fb915b8a930ff5f99ecc2854b88f4b10becdd8 (patch)
tree0079c33be885971473349e4ecaebc087ad2495c9 /src/gui_backend_slurm.c
parent4fec62a6f3f161c6a67229e52c61aedbc5eb0f36 (diff)
Write notes to file
Diffstat (limited to 'src/gui_backend_slurm.c')
-rw-r--r--src/gui_backend_slurm.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/gui_backend_slurm.c b/src/gui_backend_slurm.c
index 985a21ea..3144d10a 100644
--- a/src/gui_backend_slurm.c
+++ b/src/gui_backend_slurm.c
@@ -93,6 +93,9 @@ static void *run_indexing(const char *job_title,
char *script;
GFile *workdir_file;
GFile *cwd_file;
+ GFile *notes_file;
+ char *notes_path;
+ FILE *fh;
workdir = strdup(job_title);
if ( workdir == NULL ) return NULL;
@@ -111,6 +114,16 @@ static void *run_indexing(const char *job_title,
cwd_file = g_file_new_for_path(".");
workdir_file = g_file_get_child(cwd_file, workdir);
+ g_object_unref(cwd_file);
+
+ notes_file = g_file_get_child(workdir_file, "notes.txt");
+ notes_path = g_file_get_path(notes_file);
+ fh = fopen(notes_path, "w");
+ fputs(job_notes, fh);
+ fclose(fh);
+ g_free(notes_path);
+ g_object_unref(notes_file);
+ g_object_unref(workdir_file);
cmdline = indexamajig_command_line(geom_filename,
"`nproc`",