Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to write a simple Korn shell script to execute a loading process. The process occasionally runs into connectivity issues, so I need to kill it if it runs too long.

I have been trying the following code:

. /home/dw/script/load.ksh &
sleep 100

Unfortunately, the kill command does not kill the process - am I missing something?

share|improve this question

Try kill -s HUP "$LOADPID". And if it still doesn't work, you could try kill -s KILL "$LOADPID".

Also note that it doesn't make sense to run the . command in background (that is in another process) as the whole point of the . command is to interpret the code in the given file in the current shell process.

share|improve this answer
Running . /some/script & does have a few uses: the script is executed by the same interpreter, and inherits shell parameters, functions, etc. However none of this is happening in this specific example. – Gilles Nov 2 '12 at 22:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.