My Oracle Support Banner

ps Command Gives Wrong Exit Code Output Which Causes Backup Scripts to Fail (Doc ID 2413216.1)

Last updated on AUGUST 04, 2018

Applies to:

Oracle Linux Cloud Service - Version Oracle Linux 6.0 to Oracle Linux 6.9 [Release OL6 to OL6U9]
Linux OS - Version Oracle Linux 6.0 to Oracle Linux 6.9 [Release OL6 to OL6U9]
Linux x86-64
Linux x86

Symptoms

ps command gives wrong exit code which causes backup scripts to fail

#ps -Flp  <Any PID which doesn't exist>

#echo $?

0

Expected behavior is to get exit status code of "1" instead of "0" as the PID doesn't exist in the machine. This causes all scripts uses this logic to fail

Changes

No changes 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.