X-Git-Url: http://git.scottworley.com/tl-append/blobdiff_plain/a1160bb5b12b273f44860ccd4f028cb22c4f5e4d..7521e30b527409a49b129e344b20a87b7d5edf2b:/tl-append-test.c?ds=inline diff --git a/tl-append-test.c b/tl-append-test.c index 04c679e..e712c6f 100644 --- a/tl-append-test.c +++ b/tl-append-test.c @@ -255,7 +255,7 @@ static void write_and_read_two_lines() { static void write_to_locked_log(char *lock_types[]) { remove_logfile(); ex_t e1 = write_to_tl_append("begin\n"); - FILE *f = fopen(FILENAME, "a"); + FILE *f = fopen(FILENAME, "ae"); if (f == NULL) die_err("Couldn't open file for locking"); for (int i = 0; lock_types[i]; i++) @@ -313,7 +313,7 @@ int main() { write_to_locked_log((char *[]){NULL}); write_to_locked_log((char *[]){"fcntl", NULL}); write_to_locked_log((char *[]){"flock", NULL}); - write_to_locked_log((char *[]){"flock", "fcntl", NULL}); + write_to_locked_log((char *[]){"flock", "fcntl", NULL}); /* Deadlock risk! */ write_to_locked_log((char *[]){"fcntl", "flock", NULL}); write_concurrently(); }