My Oracle Support Banner

SQL*Plus Overwrites Unix Command Signal Int ( KiLl -2 ) Trap in Calling Script (Doc ID 341412.1)

Last updated on AUGUST 14, 2017

Applies to:

SQL*Plus - Version:
This problem can occur on any platform.


Sqlplus is ignoring the trap to stop CTRL-C from ending sqlplus.

There are 2 scripts:
One that starts sqlplus:
sqlplus -s  user/password <
exec dbms_lock.sleep(12345); 

One that calls this script and has delays:

trap "break" INT
myPlusTest &
while :
        ptree $var 
        sleep 3

When runPlusTest is called, a CTRL-C kills the sqlplus started withing myPlusTest

However, if myTest was using a OS command, that would ignore the Ctrl-C and continue processing.


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

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

In this Document

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