in reply to Responding to terminal I/O
This isn't the right way to approach this. When you do system("su"), your program will sit and wait for the su command to finish or timeout before going on the next line of code.
The larger question would be why do you want to do "su"? Are you then going to run certain commands as root? You should instead look into using something like the Expect module.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Responding to terminal I/O
by cspctec (Sexton) on Apr 17, 2013 at 18:08 UTC | |
by CountOrlok (Friar) on Apr 17, 2013 at 19:00 UTC |
In Section
Seekers of Perl Wisdom