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

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

Thread Previous | Thread Next
Prahlad Vaidyanathan
January 12, 2002 02:12
Re: why does open()ing happen only at the <FD> line ?
Message ID:

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).


$ ./
Password:[waits for password]

$ ./
    [waits for password]

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.


Prahlad Vaidyanathan <>

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

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About