Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-32028

Statements after "nohup" skipped completely

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • Red Hat Enterprise Linux - 64 Bit
      java version - 1.8
      Jenkins version- 1.609.1.1

      I have written a shell script to run a service in background and exit from the script to command line. But after running the nohup command, control does not go the next statement.

      COMMAND="nohup java -jar jenkins.war"
      echo "starting service"
      $COMMAND
      echo "service running"
      exit

      echo "service running" and exit never happens. I want to run the process in the background, and return to the command prompt while the service is still running.

      I tried resetting the BUILD_ID environment variable. This did not fix the issue.
      BUILD_ID=dontKillMe nohup java -jar test.jar &

      How to fix this issue?

            Unassigned Unassigned
            swetha_j Swetha V J
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: