[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Ayttm-commits] CVS: ayttm/src util.c,1.66,1.67
From: |
Colin Leroy <address@hidden> |
Subject: |
[Ayttm-commits] CVS: ayttm/src util.c,1.66,1.67 |
Date: |
Thu, 27 Mar 2003 14:48:21 -0500 |
Update of /cvsroot/ayttm/ayttm/src
In directory subversions:/tmp/cvs-serv20284/src
Modified Files:
util.c
Log Message:
fix double launch
Index: util.c
===================================================================
RCS file: /cvsroot/ayttm/ayttm/src/util.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -r1.66 -r1.67
--- util.c 26 Mar 2003 21:39:57 -0000 1.66
+++ util.c 27 Mar 2003 19:48:19 -0000 1.67
@@ -1399,7 +1399,7 @@
} else {
/* this means that the file exists */
if ((f = fopen(fname, "r")) != NULL) {
- char data[20];
+ char data[64], data2[64];
fscanf(f, "%d", &ourpid);
fclose(f);
snprintf(data, sizeof(data), "/proc/%d", ourpid);
@@ -1409,10 +1409,12 @@
return create_lock_file(fname);
} else {
FILE * fd = NULL;
- snprintf(data, sizeof(data), "%s/cmdline",
data);
- fd = fopen(data, "r");
- if(fd==NULL)
+ snprintf(data2, sizeof(data2), "%s/cmdline",
data);
+ fd = fopen(data2, "r");
+ if(fd==NULL) {
perror("fopen");
+ printf("can't open %s\n",data2);
+ }
else {
char cmd[1024];
fgets(cmd, sizeof(cmd), fd);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Ayttm-commits] CVS: ayttm/src util.c,1.66,1.67,
Colin Leroy <address@hidden> <=
- Prev by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.455,1.456 configure.in,1.452,1.453
- Next by Date:
[Ayttm-commits] CVS: ayttm ChangeLog,1.456,1.457 configure.in,1.453,1.454
- Previous by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.455,1.456 configure.in,1.452,1.453
- Next by thread:
[Ayttm-commits] CVS: ayttm ChangeLog,1.456,1.457 configure.in,1.453,1.454
- Index(es):