Output from mhstore

Output from mhstore

Post by Peter Davi » Mon, 06 Oct 2003 08:52:28



I'm using Earl's Cygwin port of nmh 1.0.4 on Windows.  When I run mhstore,
it gives me a nice status line that tells me the name of the file it saved,
etc.  But if I run the same command from a perl script, I get no output at
all.  It does the file saving, but no status line to stdout.  I'm trying to
run this from a CGI script, and to get the name of the file that was saved,
but when I use

I get nothing.  Nada.  Zip.  Zilch.  etc.

Any clues?

Thanks,

-pd

 
 
 

Output from mhstore

Post by Neil W Ricker » Mon, 06 Oct 2003 10:08:43



>I'm using Earl's Cygwin port of nmh 1.0.4 on Windows.  When I run mhstore,
>it gives me a nice status line that tells me the name of the file it saved,
>etc.  But if I run the same command from a perl script, I get no output at
>all.  It does the file saving, but no status line to stdout.  I'm trying to
>run this from a CGI script, and to get the name of the file that was saved,
>but when I use

>I get nothing.  Nada.  Zip.  Zilch.  etc.
>Any clues?

It is writing that message to stderr.

 
 
 

Output from mhstore

Post by Earl Ho » Wed, 08 Oct 2003 12:35:57





>>I'm using Earl's Cygwin port of nmh 1.0.4 on Windows.  When I run mhstore,
>>it gives me a nice status line that tells me the name of the file it saved,
>>etc.  But if I run the same command from a perl script, I get no output at
>>all.  It does the file saving, but no status line to stdout.  I'm trying to
>>run this from a CGI script, and to get the name of the file that was saved,
>>but when I use


>>I get nothing.  Nada.  Zip.  Zilch.  etc.

>>Any clues?

>It is writing that message to stderr.

Which means you will have to use Perl's open() operator to
capture the output.

--ewh
--

Web: <http://www.earlhood.com/>
PGP Public Key: <http://www.earlhood.com/gpgpubkey.txt>

 
 
 

Output from mhstore

Post by aw.. » Wed, 08 Oct 2003 12:41:34



|>
|>>I get nothing.  Nada.  Zip.  Zilch.  etc.
|>
|>>Any clues?
|>
|>It is writing that message to stderr.
|
|Which means you will have to use Perl's open() operator to
|capture the output.

Er wouldn't

work?
--

 
 
 

Output from mhstore

Post by Peter Davi » Fri, 10 Oct 2003 10:32:14



server.bigpond.net.au:


>|>
>|>>I get nothing.  Nada.  Zip.  Zilch.  etc.
>|>
>|>>Any clues?
>|>
>|>It is writing that message to stderr.
>|
>|Which means you will have to use Perl's open() operator to
>|capture the output.

> Er wouldn't


> work?

Thanks, all.  Using open() by itself didn't work, but using open() with the
"1>&2" redirection seems to have done the trick.  I'm now getting output.

Thanks!

-pd

 
 
 

Output from mhstore

Post by Earl Ho » Fri, 10 Oct 2003 13:48:20





>|>
>|>>I get nothing.  Nada.  Zip.  Zilch.  etc.
>|>
>|>>Any clues?
>|>
>|>It is writing that message to stderr.
>|
>|Which means you will have to use Perl's open() operator to
>|capture the output.

>Er wouldn't


>work?

I tend to prefer using open() since you have more control over
what you want and to handler errors more elegantly.

Also, you can do safe execution via '-|' usage in order to avoid
invoking the shell and potential security problems.

Example:

  $child_pid = open(CMD, "-|");
  if ($child_pid) {   # parent
    while (<CMD>) {
      ...
    }
    if (!close(CMD)) {
      ... error ...
    }

  } else {      # child
    open(STDERR, '>&STDOUT'); # dup stderr to stdout

  }

--ewh
--

Web: <http://www.earlhood.com/>
PGP Public Key: <http://www.earlhood.com/gpgpubkey.txt>

 
 
 

1. mhstore won't nmh-storage where I want it to

Hi,

After setting nmh-storage in my ~/.mh_profile to a folder other than
$HOME, it will insist on storing its files into $HOME. I'm using  1.0.4
nmh, with a commandline like:

mhstore -auto -type application/msword +folder msg_no

I've even tried setting the other nmh-xx vars that don't seem to relate,
with no success either. I have set $MHSTORE, first to point at
~/.mh_profile then to point at a different file containing the nmh-storage
variable, with equal failure. Can anyone suggest a solution/reason?

thankyou,
joel

--

my opinions in this email are not endorsed by the University of Qld
this message may not be onforwarded without my expressed permission

2. Opinions on DeScribe

3. mhstore/OE attachment conflict

4. Has anyone tried the Zoom 3049 external?

5. mhstore

6. VXL RAM 32

7. Question on mhstore

8. ZyXel and Zoom 14.4 connections

9. Sendmail won't pipe output to script [was Delivery via programs: can't create output]

10. How to adjust header/footer and margins for printed output IM?

11. Output Netmeeting Video to Composite Video Connector

12. video-output

13. No audio output on net meeting 3.01