- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Recursion too deep error.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2011 08:58 AM
тАО03-12-2011 08:58 AM
Recursion too deep error.
I got script to log user keystroke to a file.
I put that script in /etc/profile.
Everything works fine but some times while user getting loged in to system it gives error continuously as below.
"profile[4]: log1: recursion too deep."
and my script is:
HISTFILE=$HOME/.sh_history
export HISTFILE
ln=`logname`
lr=`last -R | head -1 | awk '{ print $3}'`
function log1
{
xr=$(fc -ln -0 | head -1)
z=`logger -p local3.info echo "$ln@$lr PWD $PWD $xr"`
}
trap log1 DEBUG
I hope this is happening because same function(log1) getting run multiple times when /etc/profile is getting executed.
Kindly help (Will assign points)
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-12-2011 09:11 AM
тАО03-12-2011 09:11 AM
Re: Recursion too deep error.
You may have to cancel that trap inside log1. Or put log1 in a separate script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2011 03:49 AM
тАО03-14-2011 03:49 AM
Re: Recursion too deep error.
Thanks for reply.
How could I stop this function kindly help.
But it should run after each key stroke.
Kindly help.
Chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-14-2011 03:58 AM
тАО03-14-2011 03:58 AM
Re: Recursion too deep error.
Have you tried creating a log1 script instead of a function?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-20-2011 07:06 PM
тАО03-20-2011 07:06 PM
Re: Recursion too deep error.
How can I do that could you pls help me on this.
Raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-21-2011 05:40 AM
тАО03-21-2011 05:40 AM
Re: Recursion too deep error.
That may not help since "trap" is still set. You could try turning it off in log1.
Otherwise you would need to copy your log1 function to a script called log1, move all variable settings too. And remove the "function log1 {}" around the body.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-30-2011 06:44 PM
тАО03-30-2011 06:44 PM
Re: Recursion too deep error.
Thanks again for response.
As per your suggestion I have traped function as script.
At present I have not find any issues.
Let me keep under obeservation this for two weeks.
Raj