Hm - life can be a lot easier if one starts thinking along new paths:
Why try to "detach" a process from the controlling terminal, if you can have it
started without a controlling terminal in the first place...
This one does it:
-------------------------------
#!/bin/bash
at now << HERE
megapov "`pwd`/test.ini" > "`pwd`/test.log" 2>&1
HERE
sleep 5
tail -f test.log
-------------------------------
The "sleep 5" isn't the ideal solution yet to wait for the at-job to actually
start, but that can be improved.
In fact I guess I'll actually wind up using "batch" instead of "at now", because
that seems to be exactly the wheel I was trying to invent anyway. Now I only
have to figure where to specify the load average parameter I want for the "atd"
demon...
Post a reply to this message
|