D&C Lug - Home Page
Devon & Cornwall Linux Users' Group

[ Date Index ][ Thread Index ]
[ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] emulating ttys in perl



On Sat, Apr 05, 2003 at 05:17:45PM +0100, jody salt wrote:

> I have found that it doesn't work because the program
> needs a tty.

That's because the status unformation comes out on STDERR. Since
you're doing nothing with STDERR, it would go to the tty. You might be
inclined to whack STDERR at /dev/null.

> I have since found a lot of other linux command line
> tools also need ttys in order to work.

It is the case that if you are writing to STDERR and STDOUT and you
only pipe one of them, then you'll find that the other will need to go
to the tty. Only if you pipe both of them you'll find that the tty is
not required.

> I guess I could use a pre written module, but I would
> prefer to do it my self as I would like to understand
> linux at a more low level.

I think you're looking too deep. The fact is the program wants to
print something and it's got nowhere to go.

Steve

--
The Mailing List for the Devon & Cornwall LUG
Mail majordomo@xxxxxxxxxxxx with "unsubscribe list" in the
message body to unsubscribe.


Lynx friendly