M
Micha
I have perl program which works just fine on the console, but started
in cron environment it prints "ps: don't know which terminal to
select" to stderr - btw I don't call ps explicitly at any point in my
scripts.
Now lets have a look at the details :
My script is written in perl, inside that script there is a call in
backquotes to an other perl script which starts too.
By printf-debugging I could find out that the "ps: don't know which
terminal to select" output occurs both in the parent and child script
before by first line of code. Does perl call ps before starting?? why
does it need a terminal? my script do not process stdin and stdout +
stderr are redirected into files. And for some reason this problem
occurs only when calling a perl script from an other perl script.
In interactive mode the script works just fine - I ran it from a ksh.
To execute it via cron I write a small ksh script, which reads the
environment from the .kshrc an the executes the per script sending
stdout and stderr to log-files.
Let me try to deconfuse it
Cron -> ksh-Script -> perlA -> perlB -> perlC
-when calling perlA from ksh - ok, no message
- when calling perlB from perlA or perlC from perlB - there
is a stderr message "ps: don't know which terminal to select"
which must be caused before my first line of code in the child
script
Thanks in advance, Micha
in cron environment it prints "ps: don't know which terminal to
select" to stderr - btw I don't call ps explicitly at any point in my
scripts.
Now lets have a look at the details :
My script is written in perl, inside that script there is a call in
backquotes to an other perl script which starts too.
By printf-debugging I could find out that the "ps: don't know which
terminal to select" output occurs both in the parent and child script
before by first line of code. Does perl call ps before starting?? why
does it need a terminal? my script do not process stdin and stdout +
stderr are redirected into files. And for some reason this problem
occurs only when calling a perl script from an other perl script.
In interactive mode the script works just fine - I ran it from a ksh.
To execute it via cron I write a small ksh script, which reads the
environment from the .kshrc an the executes the per script sending
stdout and stderr to log-files.
Let me try to deconfuse it
Cron -> ksh-Script -> perlA -> perlB -> perlC
-when calling perlA from ksh - ok, no message
- when calling perlB from perlA or perlC from perlB - there
is a stderr message "ps: don't know which terminal to select"
which must be caused before my first line of code in the child
script
Thanks in advance, Micha