comparison common/linuxlockfile.c @ 1162:2a1206932f53

(issue107) Comment all TODO's and FIXME's with issues as documented in issue107
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 18 Sep 2014 18:53:11 +0200
parents a974b61a5cce
children 7ea3a4c0e2ae
comparison
equal deleted inserted replaced
1161:b67681a61e3e 1162:2a1206932f53
30 lk.l_whence = SEEK_SET; 30 lk.l_whence = SEEK_SET;
31 lk.l_start = 0; 31 lk.l_start = 0;
32 lk.l_len = 0; 32 lk.l_len = 0;
33 if (fcntl(fd, F_SETLK, &lk) != -1) 33 if (fcntl(fd, F_SETLK, &lk) != -1)
34 { 34 {
35 /* FIXME: For extra security we should check if there is 35 /* FIXME (issue139): For extra security we should check if there is
36 already a pid in the file. If so we should check in 36 already a pid in the file. If so we should check in
37 /proc/$PID if there is still a process of the same name 37 /proc/$PID if there is still a process of the same name
38 as ours running... */ 38 as ours running... */
39 ftruncate(fd, 0); 39 ftruncate(fd, 0);
40 pidstrlen = (size_t)snprintf(pidstr, sizeof(pidstr), "%d", getpid()); 40 pidstrlen = (size_t)snprintf(pidstr, sizeof(pidstr), "%d", getpid());

http://wald.intevation.org/projects/trustbridge/