Lines Matching defs:pid

31 // Generates the pid file name for a given instanceDir.
39 char* relativePath = "\\logs\\server.pid";
45 sprintf(pidFile, "%s\\logs\\server.pid", instanceDir);
83 // Deletes the pid file for a given instance directory.
120 // Returns the pid stored in the pid file for a given server
121 // instance directory. If the pid could not be retrieved
164 // Kills the process associated with the provided pid.
168 BOOL killProcess(int pid)
173 debug("killProcess(pid=%d)", pid);
175 debug("Opening process with pid=%d.", pid);
180 pid
185 debug("The process with pid=%d has already terminated.", pid);
193 debugError("Failed to terminate process (pid=%d) lastError=%d.", pid, GetLastError());
202 debug("Successfully began termination process for (pid=%d).", pid);
213 debug("Process (pid=%d) has not yet exited. Sleeping for 1 second and will try %d more time(s).", pid, nTries);
218 debug("Process (pid=%d) has exited with exit code %d.", pid, exitCode);
226 debug("killProcess(pid=%d) returning %d", pid, processDead);
231 // Creates the pid file for a given instance directory.
232 // and a given pid.
236 BOOL createPidFile(const char* instanceDir, int pid)
242 debug("createPidFile(instanceDir='%s',pid=%d)", instanceDir, pid);
248 fprintf(f, "%d", pid);
251 debug("Successfully put pid=%d in the pid file '%s'.", pid, pidFile);
255 debugError("Couldn't create the pid file '%s' because the file could not be opened.", pidFile);
261 debugError("Couldn't create the pid file because the pid file name could not be constructed.");
389 // If the instance could be started the code will write the pid of the process
393 // Returns the pid of the process of the instance if it could be started and -1
436 // If the instance could be stopped the pid file
438 // not delete the pid file and the old pid of the process
442 // sets the pid file to be deleted on the exit of the process
446 // pid stored in a file of the server installation and
469 debug("Could not stop the server running at root '%s' because the pid could not be located.", instanceDir);
479 // we create no pid file).
498 // Returns the pid of the process associated with the command if it could be