LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-12-2014, 01:04 PM   #1
mohitbadgaiyan
LQ Newbie
 
Registered: Feb 2014
Posts: 3

Rep: Reputation: Disabled
ignore the TSTP signal


how to ignore the TSTP signal in script so that Ctrl-Z deactivate on the script.

Tried below
sigtstp()
{
echo "SIGTSTP received" > /dev/tty
trap - TSTP
echo "SIGTSTP standard handling restored"
}

trap - sigtstp

using above if i Ctrl-Z, it stops the script (without prompt hanging),as without above lines ctrl-Z was hanging prompt
but i want the script should not even stop and the signal should ignored compeletly.


Tried these as well but no luck (prompt hangs)
trap : TSTP # ignore Ctrl-Z requests
trap - TSTP # allow Ctrl-Z requests

please suggest
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
user-define signal handler & coredump for signal 11(SIGSEGV) Alexlun Linux - Software 2 05-24-2009 06:37 AM
How to reinstall a signal handler after exec ( Strange behaviour in signal handling ) lali.p Programming 0 09-20-2008 12:11 PM
Can't ignore signal CHLD, forcing to default David@330 Linux - Newbie 3 07-04-2005 05:43 PM
Signal 6: Unknown Signal <=> Error with MAYA4.X under Linux SOLVED!!!! Faeroon Linux - Software 9 05-09-2003 01:57 PM


All times are GMT -5. The time now is 11:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration