# filename rhel3_pre_install.sh
# from oracle
#!/bin/bash
USER=`whoami`if [ $USER != root ]; then echo "Must be root to run this script, please login as root and re-try" exitfi
# see if libcwait.so is already being loadedif [ -f "/etc/ld.so.preload" ] && [ -n "`grep libcwait /etc/ld.so.preload`" ]; then echo "Patch has already been applied" exitelse echo "Applying patch..."fi
cat << EOF |#include <errno.h>#include <sys/syscall.h>#include <sys/types.h>#include <sys/wait.h>pid_t__libc_wait (int *status){ int res; asm volatile ("pushl %