comparison common/util.h @ 1332:8362e30f7b55

(issue139) Check that pid is not running if the lock can be aquired If the lock on the lockfile can be aquired it might still be possible that another process is running. So we read the pid from the lockfile and check if another process with the same installation prefix as us is running.
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 15 Oct 2014 14:19:46 +0200
parents 0a803c3fb5a6
children
comparison
equal deleted inserted replaced
1331:8897c90b8166 1332:8362e30f7b55
66 * on linux the path is returned as is including the last /. 66 * on linux the path is returned as is including the last /.
67 * 67 *
68 * @returns The directory of the current process 68 * @returns The directory of the current process
69 */ 69 */
70 char * get_install_dir(); 70 char * get_install_dir();
71
72 #ifndef WIN32
73 /**@brief Get the directory in which the process proc resides in
74 *
75 * Look up the directory in which the process proc is placed.
76 * If the path is longer then MAX_PATH NULL is returned.
77 *
78 * Returns a utf-8 encoded string that has to be freed by the caller
79 * on linux the path is returned as is including the last /.
80 *
81 * @param[in] A process id or special name from the proc file system.
82 *
83 * @returns The directory of the process
84 */
85 char * get_proc_install_dir(const char *proc);
86 #endif
71 87
72 #ifdef WIN32 88 #ifdef WIN32
73 /**@brief Get a copy of the processes owner sid 89 /**@brief Get a copy of the processes owner sid
74 * 90 *
75 * Copy the SID of the owner of the process hProcess. 91 * Copy the SID of the owner of the process hProcess.

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