I believe that the "restart" which Jenkins starts a new process and stops 
the currently running process.  In that case, I don't think it is possible 
to retain the same PID, since that would require two processes running at 
the same time with duplicate PID's.

Mark Waite

On Monday, September 2, 2013 12:58:30 PM UTC-6, mpapo - Michaël Pailloncy 
wrote:
>
> 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 <christoph...@inria.fr <javascript:>>
>
>> 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 jenkinsci-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to