in reply to Re: Re: calling an external program, from within a perl script
in thread calling an external program, from within a perl script

Let's see...

I tried the script myself using mkfs -t ext2 /dev/fd0 and it worked fine. Messages were output to STDERR but no problem whatsoever. I don't have xfs so I can't test it under your conditions, but perhaps you can test the script under mine and see what happens.

If it works fine, my guess is that mkfs.xfs expects some kind of interaction with the user (you mentioned a condition where --force was necessary) and it dies because it's not connected to a terminal.

If it still does not work, experiment:

And so on. By observing (hopefully) different behaviours, it should be possible to determine what triggers the problem. Hope this helps!

-- TMTOWTDI

Replies are listed 'Best First'.
Re: Re: Re: Re: calling an external program, from within a perl script
by nick (Sexton) on Aug 10, 2001 at 11:28 UTC
    Maybe at this point it would be good to know that the main program is a CGI, therefore, the fact that I can write a simple perl script to run this command wil work when I run it from the command line, but wont when I run that same script from the CGI. (however, if I run a system call in the CGI for a command, like for instance, cat, ir works fine.
     
    Does this help at all?
     
    - Nick