Re: Perl hack - fooling isatty() ?
2009/4/13 ronys ro...@gmx.net: Hi, I need to call e2fsck from a Perl script. Thing is, e2fsck checks if it's being run interactively or not (using isatty(0) isatty(1)), and exits if not. I know that calling e2fsck with -p/-n/-y would fix this, but this is not an option for me (don't ask). So, is there some Perl magic that will fool a Perl script's subprocesses into thinking they're connected to a terminal? Not sure but your question immidietely brings up Expect as an option to explore: http://search.cpan.org/dist/Expect/ --Amos ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il
Perl hack - fooling isatty() ?
Hi, I need to call e2fsck from a Perl script. Thing is, e2fsck checks if it's being run interactively or not (using isatty(0) isatty(1)), and exits if not. I know that calling e2fsck with -p/-n/-y would fix this, but this is not an option for me (don't ask). So, is there some Perl magic that will fool a Perl script's subprocesses into thinking they're connected to a terminal? Cheers, Rony ___ Linux-il mailing list Linux-il@cs.huji.ac.il http://mailman.cs.huji.ac.il/mailman/listinfo/linux-il