Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9cedb16

Browse files
committed
pg_regress: Observe TMPDIR
Put the temporary socket directory under TMPDIR, if that environmentvariable is set, instead of the hardcoded /tmp.This allows running the tests if there is no /tmp at all (for exampleon Windows, although running the tests with Unix-domain sockets is notenabled on Windows yet). We also use TMPDIR everywhere else /tmp ishardcoded, so this makes the behavior consistent.Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>Discussion:https://www.postgresql.org/message-id/flat/54bde68c-d134-4eb8-5bd3-8af33b72a010@2ndquadrant.com
1 parentb79911d commit9cedb16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎src/test/regress/pg_regress.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,8 @@ signal_remove_temp(int signum)
330330
staticconstchar*
331331
make_temp_sockdir(void)
332332
{
333-
char*template=pg_strdup("/tmp/pg_regress-XXXXXX");
333+
char*template=psprintf("%s/pg_regress-XXXXXX",
334+
getenv("TMPDIR") ?getenv("TMPDIR") :"/tmp");
334335

335336
temp_sockdir=mkdtemp(template);
336337
if (temp_sockdir==NULL)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp