On Fri, Jan 11, 2002 at 06:24:33PM +0000, Prahlad Vaidyanathan wrote: > I'm guessing this has to do with how long it takes to invoke sudo (given > system load, etc). It does. > But, all the same, shouldn't it wait for the password to be entered > _before_ printing 'test' ? Now I'm totally stumped. As mentioned by someone else (was it Bob Showalter?), with the way open works you're not guaranteed of this. If you want to make sure that what you print out comes after the password is entered then you're going to have to make provisions for that. One possible solution (and I'm not certain it works) is to select for readability on your handle; see perldoc -f select, perldoc perlipc, and perldoc IO::Select. Another is to read the password yourself, then pass that on to sudo; this would require that sudo accept passwords on standard input, and that you open the handle for reading and writing with IPC::Open2. Michael -- Administrator www.shoebox.net Programmer, System Administrator www.gallanttech.com --Thread Previous