summaryrefslogtreecommitdiff
path: root/src/filelock.c
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2004-11-27 22:09:40 +0000
committerAndreas Schwab <schwab@suse.de>2004-11-27 22:09:40 +0000
commit4ba93ac05d20ea926b077237900dd92962aaeba4 (patch)
tree45e59eb38796981b527e6c2ffa13929cecaadf14 /src/filelock.c
parent94221759560ce496449f87fff47cd0b501f7965d (diff)
downloademacs-4ba93ac05d20ea926b077237900dd92962aaeba4.tar.gz
(lock_file_1): Call get_boot_time early. Increase
buffer size.
Diffstat (limited to 'src/filelock.c')
-rw-r--r--src/filelock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/filelock.c b/src/filelock.c
index cbf3f860a92..84540f79330 100644
--- a/src/filelock.c
+++ b/src/filelock.c
@@ -377,6 +377,9 @@ lock_file_1 (lfname, force)
char *host_name;
char *lock_info_str;
+ /* Call this first because it can GC. */
+ boot_time = get_boot_time ();
+
if (STRINGP (Fuser_login_name (Qnil)))
user_name = (char *)SDATA (Fuser_login_name (Qnil));
else
@@ -386,9 +389,8 @@ lock_file_1 (lfname, force)
else
host_name = "";
lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name)
- + LOCK_PID_MAX + 5);
+ + LOCK_PID_MAX + 30);
- boot_time = get_boot_time ();
if (boot_time)
sprintf (lock_info_str, "%s@%s.%lu:%lu", user_name, host_name,
(unsigned long) getpid (), (unsigned long) boot_time);