222 |
args[3] = Qnil; |
args[3] = Qnil; |
223 |
args[4] = build_string ("-c"); |
args[4] = build_string ("-c"); |
224 |
sprintf (cmd_string, "gunzip < %s.%d.gz > %s", |
sprintf (cmd_string, "gunzip < %s.%d.gz > %s", |
225 |
WTMP_FILE, counter, XSTRING (tempname)->data); |
WTMP_FILE, counter, SDATA (tempname)); |
226 |
args[5] = build_string (cmd_string); |
args[5] = build_string (cmd_string); |
227 |
Fcall_process (6, args); |
Fcall_process (6, args); |
228 |
filename = tempname; |
filename = tempname; |
232 |
|
|
233 |
if (! NILP (filename)) |
if (! NILP (filename)) |
234 |
{ |
{ |
235 |
get_boot_time_1 (XSTRING (filename)->data, 1); |
get_boot_time_1 (SDATA (filename), 1); |
236 |
if (delete_flag) |
if (delete_flag) |
237 |
unlink (XSTRING (filename)->data); |
unlink (SDATA (filename)); |
238 |
} |
} |
239 |
} |
} |
240 |
|
|
325 |
trailing period plus one for the digit after it plus one for the |
trailing period plus one for the digit after it plus one for the |
326 |
null. */ |
null. */ |
327 |
#define MAKE_LOCK_NAME(lock, file) \ |
#define MAKE_LOCK_NAME(lock, file) \ |
328 |
(lock = (char *) alloca (STRING_BYTES (XSTRING (file)) + 2 + 1 + 1 + 1), \ |
(lock = (char *) alloca (SBYTES (file) + 2 + 1 + 1 + 1), \ |
329 |
fill_in_lock_file_name (lock, (file))) |
fill_in_lock_file_name (lock, (file))) |
330 |
|
|
331 |
static void |
static void |
337 |
struct stat st; |
struct stat st; |
338 |
int count = 0; |
int count = 0; |
339 |
|
|
340 |
strcpy (lockfile, XSTRING (fn)->data); |
strcpy (lockfile, SDATA (fn)); |
341 |
|
|
342 |
/* Shift the nondirectory part of the file name (including the null) |
/* Shift the nondirectory part of the file name (including the null) |
343 |
right two characters. Here is one of the places where we'd have to |
right two characters. Here is one of the places where we'd have to |
378 |
char *lock_info_str; |
char *lock_info_str; |
379 |
|
|
380 |
if (STRINGP (Fuser_login_name (Qnil))) |
if (STRINGP (Fuser_login_name (Qnil))) |
381 |
user_name = (char *)XSTRING (Fuser_login_name (Qnil))->data; |
user_name = (char *)SDATA (Fuser_login_name (Qnil)); |
382 |
else |
else |
383 |
user_name = ""; |
user_name = ""; |
384 |
if (STRINGP (Fsystem_name ())) |
if (STRINGP (Fsystem_name ())) |
385 |
host_name = (char *)XSTRING (Fsystem_name ())->data; |
host_name = (char *)SDATA (Fsystem_name ()); |
386 |
else |
else |
387 |
host_name = ""; |
host_name = ""; |
388 |
lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) |
lock_info_str = (char *)alloca (strlen (user_name) + strlen (host_name) |
503 |
|
|
504 |
/* On current host? */ |
/* On current host? */ |
505 |
if (STRINGP (Fsystem_name ()) |
if (STRINGP (Fsystem_name ()) |
506 |
&& strcmp (owner->host, XSTRING (Fsystem_name ())->data) == 0) |
&& strcmp (owner->host, SDATA (Fsystem_name ())) == 0) |
507 |
{ |
{ |
508 |
if (owner->pid == getpid ()) |
if (owner->pid == getpid ()) |
509 |
ret = 2; /* We own it. */ |
ret = 2; /* We own it. */ |