Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 need to run an application with krenew, but the application also needs to receive a parameter via command line and I need to send its output to a file. From the documentation, it looks like this should do the trick:

krenew -t -- sh -c 'compute-job > /afs/local/data/output'

but, unfortunately, when I run the command below:

krenew -s -- sh -c './my_app config.xml > results/test.txt &'

the application just dies after a while and I can see from the output of ps aux that krenew is not running along with my_app. I am not sure what the parameter -t does, and as far as I can see, if I run krenew -s ./my_app, it works properly.

I hope someone can clarify this.

Update: If I remove the "&" character from the command (so it won't be detached from the console it works just fine, so I decided to run it in a SCREEN tab. While this is not the best solution, it does the job.

share|improve this question
up vote 1 down vote accepted

Instead of running it in a screen session you should be able to use:

krenew -t -- sh -c './my_app config.xml > results/test.txt' &

Notice the & detaching krenew from your shell, but not your application from the spawned sh. The -t parameter fetches a AFS token along with your Kerberos ticket. You only need this if your command needs to access a AFS file system.

share|improve this answer
That is cool. It would have never crossed my mind that & needs to be applied to krenew instead of the process that I want to run... – Mihai Todor Dec 7 '12 at 13:49

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.