Hi,

I don't think you can set a specific PID for any process. Moreover, I don't
think you can obtain the correct status of Jenkins via its process.
Instead, you can access its status (or deduct it) via many ways including :

   - Jenkins cli API : see
   https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+CLI
   - Jenkins rest API : see
   https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API
   - curl/wget to Jenkins home page via script

Hope this help.




2013/9/2 Christophe Demarey <[email protected]>

> Hi all,
>
> I think I have a simple question for you but really important for me : How
> to prevent Jenkins to change its PID after a Jenkins restart (ex: Jenkins
> update or plugin update)?
> I really need this behavior to have working daemon scripts because they
> use the PID to know the status of the Jenkins process. If the Jenkins PID
> changes, the script is lost.
>
> For information, here is the command the deamon use to run Jenkins:
> /usr/bin/daemon --name=myjenkins --inherit
> --env=JENKINS_HOME=/home/myjenkins --output=/var/log/ci/myjenkins.log
> --pidfile=/var/run/jenkins/myjenkins.pid -- /usr/bin/java -jar
> /home/myjenkins/jenkins.war --webroot=/home/myjenkins/.jenkins/war
> --httpPort=17001 --ajp13Port=-1 --httpsPort=-1 --prefix=/myjenkins
>
> Thanks for any answer.
>
> Berst regards,
> Christophe.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to