diff options
author | Dave Davenport <qball@gmpclient.org> | 2018-05-16 22:02:13 +0200 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2018-05-16 22:07:53 +0200 |
commit | 1cd769894338df894dc7c5b5ef0db911f79bfc03 (patch) | |
tree | 3435e385655f84573bf913d403a509630cc399ef /test | |
parent | bc42f244fa70ce7d2f89d9f8534f47949dd24fce (diff) |
[Test] Helper:Pidfile generate tmp. pidfilename.
Diffstat (limited to 'test')
-rw-r--r-- | test/helper-pidfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/helper-pidfile.c b/test/helper-pidfile.c index 6149e0c9..e6550a4c 100644 --- a/test/helper-pidfile.c +++ b/test/helper-pidfile.c @@ -71,7 +71,8 @@ int main ( G_GNUC_UNUSED int argc, G_GNUC_UNUSED char ** argv ) // Tests basic functionality of writing it, locking, seeing if I can write same again // And close/reopen it again. { - char *path = tempnam(NULL, "rofi-pid"); + const char *tmpd = g_get_tmp_dir (); + char *path = g_build_filename (tmpd, "rofi-pid.pid", NULL); TASSERT( create_pid_file ( NULL ) == -1 ); int fd = create_pid_file ( path ); TASSERT( fd >= 0 ); |