In nodelock show program name if node is already locked
This commit is contained in:
parent
ce1a91279d
commit
87b2b022a2
@ -7,6 +7,9 @@ v0.81.0 07-Oct-2005
|
||||
The bbs menu Change Screenlength is obsolete. Remove this from
|
||||
the menus (setup.mnu) and ascii/ansi screens (setup.a??).
|
||||
|
||||
libmbse.a:
|
||||
In nodelock show program name if node is already locked.
|
||||
|
||||
mbcico:
|
||||
Made binkp GZ and BZ2 compression final.
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
||||
|
||||
int nodelock(faddr *addr, pid_t mypid)
|
||||
{
|
||||
char *fn, *tfn, *p, tmp[16];
|
||||
char *fn, *tfn, *p, tmp[16], *progname;
|
||||
FILE *fp;
|
||||
pid_t pid;
|
||||
int tmppid, sverr, rc;
|
||||
@ -119,7 +119,12 @@ int nodelock(faddr *addr, pid_t mypid)
|
||||
Syslog('+', "Found lock older then 6 hours for %s, unlink", ascfnode(addr,0x1f));
|
||||
unlink(fn);
|
||||
} else {
|
||||
Syslog('+', "Node %s is locked by pid %d", ascfnode(addr, 0x1f), pid);
|
||||
progname = calloc(PATH_MAX, sizeof(char));
|
||||
if (pid2prog(pid, progname, PATH_MAX) == 0)
|
||||
Syslog('+', "Node %s is locked by pid %d (%s)", ascfnode(addr, 0x1f), pid, progname);
|
||||
else
|
||||
Syslog('+', "Node %s is locked by pid %d", ascfnode(addr, 0x1f), pid);
|
||||
free(progname);
|
||||
unlink(tfn);
|
||||
free(tfn);
|
||||
return 1;
|
||||
|
Reference in New Issue
Block a user