NAME

jenkins-procguard-monitor - internal detail of jenkins-procguard

SYNOPSIS

jenkins-procguard command arg1 arg2 ...

DESCRIPTION

Runs a subprocess in a separate process tree and without the Jenkins environment variables that it uses to find processes.

It will detach the subprocess from the process tree by using setsid, but it will monitor that process and send whatever signals are sent to this process to the process being monitored, and will only exit once the other process has exitted.

ENVIRONMENT

This will remove any of the documented jenkins job variables from the process before the fork and exec. It will also set JENKINS_PROCGUARD_MONITOR_PID with the pid of the process that is monitoring it.

EXIT CODE

The guard will open a pipe between the two sides to send back the exit status when the monitored process exits.

COPYRIGHT

Copyright 2016 Bloomberg Finance L.P.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.