On February 3, 2025 3:17:55 PM EST, Todd Gruhn <tgru...@gmail.com> wrote:
>...
>            open(FH, '|-') || exec("/usr/pkg/bin/cdrecord" . $arg1 .
>$arg2); ## WORKED
>...

You're never reaching this line:
>      open(FH, '|-') || exec ("/sbin/newfs_udf" . $arg3 . $arg4 .
>$arg5 ); ## BUUUT!
...
>I type it in by hand -- it works. IF PERL newfs the DVD, it  dies.
>What is wrong here; what is the best way to do this??
>I do this in a root-prigram...

"The exec function executes a system command and never returns; use system 
instead of exec if you want it to return"
https://perldoc.perl.org/functions/exec

Also, though it happens to be ok with these particular args, it's dangerous to 
concatenate a command string instead of passing a list or args.

Reply via email to