Subject: Re: Can pine pipe in background???

From: [email-masked] (Orjan Johansen)
Date: 12 Mar 1997 00:25:52 GMT

In article <Pine.SUN.3.95.970310162113.10741A-100000@lovebox>,
Sheung-Fan Wen  <[email-masked]> wrote:
>Under Unix pine 3.95:
>
>If you pipe/print a message using: "cat - > file.txt", it works fine.  But
>if you use "cat - > file.txt &", you get a file with zero byte count.  Why
>is this so? Is this a SunOS problem? Are there alternative ways to
>accomplish this? 

Nope, it is quite general Unix: & commands don't get the parent's 
standard input.  Otherwise they would lock up the terminal in normal 
use, just the opposite of their purpose.

Pine cannot continue with anything until it has written the entire 
message into the pipe, since it is not multithreaded. (With the 
exception of the experimental background-sending.) So I don't see how 
what you are trying can work even if you can grab the input. You 
cannot reduce the time needed to cat.

However, if what you really want is to do something else with the 
file, you can pipe into a script like the following:

----
#!/bin/sh
cat > file.txt
myheavydutycommand file.txt &
----

Then at least you can continue after the cat.

Now if someone could make pine multithreaded so we could avoid 
those long pauses at mailbox update..

Greetings,
Ørjan.

---

From: Sheung-Fan Wen <[email-masked]>
Date: Tue, 11 Mar 1997 00:35:00 GMT

Under Unix pine 3.95:

Thanks in advance.

>From the desk of Sheung . . .

~+-,._.,-+~'`^`'~+-,._.,-+~'`^`'~+-,._.,-+~'`^`'~+-eos.
 + Views expressed here do not reflect those of NSC. +
   Spam/Solicitation are NOT tolerable at this addr.
     For more info, see: http://www.vix.com/spam