UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here!
  #1  
Old November 8th, 2004, 06:38 AM
mauMI mauMI is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 1 mauMI User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
killing jobs in C-shell scripts

Hi all,
I'd like to know how to run and kill jobs in a c-shell scripts..
I mean: last week I tried to run this simple script:

#! /bin/csh

donalduck &

sleep 60


kill %1


the problem is that sometimes it' s not able to stop the background script (donalduck running job not found).
I' ve tried to substitute the line : "kill %1" with "kill -9 %1"
or "kill <pid>" or "kill -9 <pid>", but the behaviour is the same!!
Moreover it seems that the problem is only present in c-shell
scripts because I ran the same script using Ksh and it worked always well.

Can anybody explain me the different behaviuor from the two shell?? Is there any other mechanism I can use inr C-shell to overcome the problem?

Thanks for the support!

Reply With Quote
  #2  
Old November 8th, 2004, 08:04 AM
guggach guggach is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2004
Location: Middle Europa
Posts: 1,083 guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level)guggach User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 4 Days 19 h 44 m 45 sec
Reputation Power: 9
imo
the best cmd-line shell: csh
the worst script shell: csh
csh (in script) is buggy, bsd joungs did not finish the job
don't use csh for scripts, if you want sure they work on EVERY
*nix use bourne.
if you need more infos, google for csh scripts, a lot of papers.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > killing jobs in C-shell scripts


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway