377 |
char *host_name; |
char *host_name; |
378 |
char *lock_info_str; |
char *lock_info_str; |
379 |
|
|
380 |
|
/* Call this first because it can GC. */ |
381 |
|
boot_time = get_boot_time (); |
382 |
|
|
383 |
if (STRINGP (Fuser_login_name (Qnil))) |
if (STRINGP (Fuser_login_name (Qnil))) |
384 |
user_name = (char *)SDATA (Fuser_login_name (Qnil)); |
user_name = (char *)SDATA (Fuser_login_name (Qnil)); |
385 |
else |
else |
389 |
else |
else |
390 |
host_name = ""; |
host_name = ""; |
391 |
lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) |
lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) |
392 |
+ LOCK_PID_MAX + 5); |
+ LOCK_PID_MAX + 30); |
393 |
|
|
|
boot_time = get_boot_time (); |
|
394 |
if (boot_time) |
if (boot_time) |
395 |
sprintf (lock_info_str, "%s@%s.%lu:%lu", user_name, host_name, |
sprintf (lock_info_str, "%s@%s.%lu:%lu", user_name, host_name, |
396 |
(unsigned long) getpid (), (unsigned long) boot_time); |
(unsigned long) getpid (), (unsigned long) boot_time); |