develooper Front page | perl.beginners | Postings from January 2002

Re: why does open()ing happen only at the <FD> line ?

Thread Previous | Thread Next
From:
Prahlad Vaidyanathan
Date:
January 12, 2002 02:12
Subject:
Re: why does open()ing happen only at the <FD> line ?
Message ID:
20020111022447.GA2630@marvin.clone
Hi,

On Thu, 10 Jan 2002 Michael Fowler spewed into the ether:
[-- snip --]
> Um, how do you figure?  The sudo program prints out the "Password:" prompt,
> and from your output you can clearly see "test" is after "Password:".  So
> sudo is being run before "test" is printed.

Yes, I noticed that _just_ after I posted. This is kinda weird, but the
test case behaves differently at different points in time.

Sometimes, 'test' is printed, and only then the sudo prompt appears. At
other times, the sudo prompt appears, 'test' is printed, and it waits at
the next line for the password (like my post yesterday).

ie.

<test1>
$ ./test.pl
test
Password:[waits for password]
....
</test1>

<test2>
$ ./test.pl
Password:test
    [waits for password]
....
</test2>

I'm guessing this has to do with how long it takes to invoke sudo (given
system load, etc). But, all the same, shouldn't it wait for the password
to be entered _before_ printing 'test' ? Now I'm totally stumped.

Thanks.

pv.
-- 
Prahlad Vaidyanathan <slime@vsnl.net>

There's nothing very mysterious about you, except that
nobody really knows your origin, purpose, or destination.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About