On Tue, Apr 03, 2001 at 09:25:26AM -0700, Harry Putnam <[EMAIL PROTECTED]> wrote:
| > Another possibility is that your script is dependent upon running on
| > a terminal. Cron jobs do not have a controlling terminal, nor do they
| > have a tty attached to any inputs or outputs.
|
| What kind of things would do that. Do you mean something like an
| explicit redirect to /dev/tty, or are there other less obvious things.
Pretty much only things explicitly opening /dev/tty.
You may also get it if some clueless piece of code assumes it's talking
to a tty and does a stty or something like that.
| > Suggestion: this will be tedious, but run "strace -f" on your script
| > in the cron, like:
| I guess I'll still ask the question above, still, but I see now, at
| least one thing that will trip that behavior.
|
| Your guesses were good ones, and the strace worked to tip it off.
| It turned out to be an elisp message contained in the loaded file,
| that gets sent to screen, causing the trouble.
When you say "to screen", what precisely does that mean?
| So I guess the cure is to make sure any things that will write to
| screen are redirected. Doesn't seem to include echo statements
| though.
Shouldn't be necessary - the output gets logged (for you email) anyway;
redirecting elswhere shouldn't really help (except that /dev/null is
a character device, and so may be enough like a tty to make the elisp
happy).
| Do you have a rough idea what things will turn up in this kind of error?
The strace should show an explicit example.
Probably anything assuming it has a controlling terminal (which trying to
open /dev/tty pretty much does) may trip this I guess.
--
Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/
Gauls! We have nothing to fear; except perhaps that the sky may fall
on our heads tomorrow. But as we all know, tomorrow never comes!!
- Adventures of Asterix
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list