procmail
[Top] [All Lists]

Re: program's output from recipe script

2000-03-07 15:45:47
Vik asked,

| Does anyone know where the stdout from a program invoked from the
| .procmailrc is sent to?
| I know I can redirect it into a file. But if I plain simply write:
| 
| |/usr/local/bin/someprg
| 
| then where can I find the program's output?

If procmail was called from a process where output was connected to a
terminal (for example, interactively from a shell prompt), it will inherit
the parent's file descriptors.  If it is invoked in the background on
incoming mail (again, because it inherits the parent's file descriptors)
stdout will go nowhere.  I believe that fd1 is closed in that case.

On the other hand, if you have the LOGFILE variable pointing to a writable
file, stderr will be written there.

If you need to use the program's output, you can direct it to a temporary
file or save it in a variable.

<Prev in Thread] Current Thread [Next in Thread>