in reply to Re^2: Using File::Temp Names
in thread Using File::Temp Names

What's PB::FileUtils? Even google does not seem to know ...

Does it execute runWorkflow.pl (ScriptB?) immediately and synchronously, on the same machine, under the same chroot, and with the same privileges (user/group)?

Or, perhaps more easily answered, if you just run it with system {@pmcmd[0]} @pmcmd, does it see the file?

print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!

Replies are listed 'Best First'.
Re^4: Using File::Temp Names
by novicepl (Initiate) on Aug 01, 2006 at 17:36 UTC
    PB::FileUtils is our own module.
    ScriptsB is ran through above mentioned package as
    ... $cmd=join(' ', @$args); $output=`$cmd`; ...
    Probably this is opening child process and executing the ScriptB using the temp filename passed as a parameter. What is the solution in this case. How can child process access the temp file?

      If this is happening synchronously in the same process, the child should be able to read the file. So, does it happen synchronously? Is it in the same process?

      Does the child (ScriptB) drop privileges? Does it run under a different chroot? How does it try to open the file?

      Either the child or PB::FileUtils is doing something here to make the file (seem?) inaccessible, but you haven't shown us that particular code, so I cannot say what.

      If you would try running the child with system {@pmcmd[0]} @pmcmd, as I suggested, we might be able to find whether or not the "something" in question is found in PB::FileUtils. But even then, I would have to see the code from the guilty party (be it PB::FileUtils or ScriptB) before I can say what precisely is wrong.

      print "Just another Perl ${\(trickster and hacker)},"
      The Sidhekin proves Sidhe did it!