hi all please help me in this issue.


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting hi all please help me in this issue.
# 8  
Old 08-05-2009
hi Kshji

Kshji,

I am very sorry for my misunderstanding of the code.Its because of my poor knowledge.Now I got the one from your precious code.But what I thought is. If i have a program and it is running.Different signals comes into picture.So i want to trap the signals form that program and some functioning for that particular signal.
The signals are,
case SIGHUP
case SIGINT
case SIGQUIT
case SIGILL
case SIGABRT
case SIGFPE
case SIGKILL
case SIGBUS
case SIGSEGV
case SIGSYS
case SIGTERM
case SIGCHLD
This what I required.But i dont know to code these signlas to trap.Now i got the solution for this.If u have any valuable suggestion about the code please share with me.

I am very thankful for the answer you given, Its 100% helped me.

Once agian i am very sorry for mistake.

Thanks,
Vijay,

Last edited by bhas85; 08-05-2009 at 08:02 AM..
# 9  
Old 08-05-2009
Quote:
Originally Posted by Neo
Your original subject text was clearly a rule violation, but our moderators did not give you an infraction for that. They were kind to you.
Now I'm out. Do you mean my update was the reason = link to trap/kill ?
That is added after bhas85 edit the update message: add the ex. about signal list ??? I was unhappy that thead greater not tested 1st solution using every some signals like 1,2,3,9,15, ...

I read my answer again - there is so little mistake - I tried to ask from bhas85 has he/she full tested the johnbach excellent answer. Did you test jonbach script = need edit. As you said, english is not my the best language. Did you test jonbach's script was that what I mean.

Or I have still big problem to understand your opinion. That is also possible.

---------- Post updated at 02:18 PM ---------- Previous update was at 02:11 PM ----------

Quote:
Originally Posted by bhas85
Kshji,
No problem.

If you like to be sure that you can control process, then make it like 1st johnbach solution has done - wait works in everycase. Make process which control your process. If process get ex. signal 9, you can't catch it yourself, but mother process can live with it = wait has done = so you can't restart yourself. But if you accept this then you can use trap as you have already done.
# 10  
Old 08-05-2009
hi Kshji

Kshji,

I tested both of the valuable solutions which is given by you trap/signal and johnbach.The suggested solutions help me a lot in resolving my problem.
If i did any mistake in my posting please pardon me with your kind heart.But the solutions which you gave to me helped alot and made me to understand how to process the signals and to trap the signals.

Thank you very much once again,
Vijay,
# 11  
Old 08-05-2009
OK,

Thanks for the replies,

I think there is some confusion based on language and culture. I will review the thread and make adjustments.

Let's all be more patient with our non-native speaking members, who we have always welcomed.

Enjoy!

---------- Post updated at 12:17 ---------- Previous update was at 11:38 ----------

Quote:
Originally Posted by kshji
Or I have still big problem to understand your opinion. That is also possible.
OK, I was confused in my reply. My apologies. I see now you were not the original poster.

I also see that English is not your native language and you did not intend to insult another member.

Giving you the benefit of doubt, I will reverse your infraction.

Best of luck. (Thead closed)

Note to original poster bhas85: Please follow forum posting rules.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issue with wc -c and wc -m

Hi All, I have a small queries to get the character count i tried with wc -c and wc -m but its not returend current result For eg: wc -c wc -m echo "Name" | wc -c result: 5 but actually it should returned 4 Help me on this to ge the correct one. Thanks! ----------... (4 Replies)
Discussion started by: siva.pitchai
4 Replies

2. Shell Programming and Scripting

What could be the issue ?

Hi, when i am trying below script assume that below values are taken in code #!/bin/ksh if then echo usage: aNlist.sh QMGR NAME MQREQ fi NL=`echo 'dis qmgr'|runmqsc $1|grep REPOSNL|sed 's/.*REPOSNL\(.*\).*/\1/' |cut -d'(' -f2|cut -d')' -f1` echo 'define nl('$NL_$2')... (25 Replies)
Discussion started by: darling
25 Replies

3. Shell Programming and Scripting

Variable value substitution issue with awk command issue

Hi All, I am using the below script which has awk command, but it is not returing the expected result. can some pls help me to correct the command. The below script sample.ksh should give the result if the value of last 4 digits in the variable NM matches with the variable value DAT. The... (7 Replies)
Discussion started by: G.K.K
7 Replies

4. Shell Programming and Scripting

Need assistance with a file issue and a terminal issue

Hello everyone, I'm in need of some assistance. I'm currently enrolled in an introductory UNIX shell programming course and, well halfway through the semester, we are receiving our first actual assignment. I've somewhat realized now that I've fallen behind, and I'm working to get caught up, but for... (1 Reply)
Discussion started by: MrMagoo22
1 Replies

5. Shell Programming and Scripting

CP Issue

I want to copy large amount of files aproximately more than 20,000 files from one file system to another file system, but it gives me error like: #cd /opt/appserver/images #cp * /opt/appserver02/public/images Argument list is too long Also above mention error appear again when i run: ... (1 Reply)
Discussion started by: telnor
1 Replies

6. Solaris

IP issue

hi , I have a Solaris server which is part of a domain. The IP for this Solaris box is allocated dyanamically by a DHCP. Everytime the solaris box is restarted the IP gets changed. Being an admin what should i do to find the new ip of the Solaris server sitting at my location? Till now i get... (2 Replies)
Discussion started by: BalajiUthira
2 Replies

7. UNIX for Dummies Questions & Answers

ISSUE and ISSUE.NET files

In LINUX(CentOS, RedHat) is there a way to have the banner statement appear before the logon instead of after the logon? In UNIX and Windows the banner appears before a person actually logs on, what I'm seeing in LINUX is that it appears after the login(ftp, telnet, SSH). Thanks (0 Replies)
Discussion started by: ejjones
0 Replies

8. Shell Programming and Scripting

Unix Arithmatic operation issue , datatype issue

Hi, I have a shell scripting. This will take 7 digit number in each line and add 7 digit number with next subsequent lines ( normal addition ). Eg: 0000001 0000220 0001235 0000022 0000023 ........... ......... ........ Like this i am having around 1500000 records. After adding... (23 Replies)
Discussion started by: thambi
23 Replies

9. UNIX for Dummies Questions & Answers

ps issue

HI All, Suddenly don't know what happened to redhat linux 7.2 any program start then itsn't listing while using ps -ef ex: ./xyz this xyz program pid not showing in ps-ef Pls let me know what is the reason for the same. Thanks a lot in advance Bache (7 Replies)
Discussion started by: bache_gowda
7 Replies
Login or Register to Ask a Question