diff --git a/lib/vfs/interface.c b/lib/vfs/interface.c
index 545dd1d46..82bc2d55e 100644
a
|
b
|
mc_mkstemps (vfs_path_t ** pname_vpath, const char *prefix, const char *suffix) |
762 | 762 | /* --------------------------------------------------------------------------------------------- */ |
763 | 763 | /** |
764 | 764 | * Return the directory where mc should keep its temporary files. |
765 | | * This directory is (in Bourne shell terms) "${TMPDIR=/tmp}/mc-$USER" |
| 765 | * This directory is (in Bourne shell terms) "${TMPDIR=/tmp}/mc-$USER-$PID" |
766 | 766 | * When called the first time, the directory is created if needed. |
767 | 767 | * The first call should be done early, since we are using fprintf() |
768 | 768 | * and not message() to report possible problems. |
… |
… |
mc_tmpdir (void) |
793 | 793 | |
794 | 794 | pwd = getpwuid (getuid ()); |
795 | 795 | if (pwd != NULL) |
796 | | g_snprintf (buffer, sizeof (buffer), "%s/mc-%s", sys_tmp, pwd->pw_name); |
| 796 | g_snprintf (buffer, sizeof (buffer), "%s/mc-%s-%lu", sys_tmp, pwd->pw_name, (unsigned long) getpid ()); |
797 | 797 | else |
798 | | g_snprintf (buffer, sizeof (buffer), "%s/mc-%lu", sys_tmp, (unsigned long) getuid ()); |
| 798 | g_snprintf (buffer, sizeof (buffer), "%s/mc-%lu-%lu", sys_tmp, (unsigned long) getuid (), (unsigned long) getpid ()); |
799 | 799 | |
800 | 800 | canonicalize_pathname (buffer); |
801 | 801 | |