RedRooster
Programmer
Any help would be greatly appreciated. I have never worked with fork before and I need to convert this win32 process to work on a Unix box. I think fork is the way to go but I am not sure where exactly to begin.
Here is the win32 code I have to convert. Any help or comments would be great.
#*****************RCP the Data File*********************************
Win32:
rocess::Create ($ProcessObj, $RCPExePath, $CmdLine, 1, DETACHED_PROCESS, $JustTrfrFilePath);
#Create a win32 process
$ProcessObj->SetPriorityClass (NORMAL_PRIORITY_CLASS); #set the priority
$ProcessObj->Wait(INFINITE); #wait until the process is finished
$ProcessObj->GetExitCode($ExitCode); #get the exit code, it should be 0 when successful
if ($ExitCode != 0) #RCP failed
{
print $SysOutPointer ("!!!!!!!!!!!!!!!!!!!!!!!!ERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
;
print $SysOutPointer ("RCP failed to Upload Transfer file\n"
;
print $SysOutPointer ("!!!!!!!!!!!!!!!!!!!!!!!!ERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"
;
$ErrorStatus = $main::ConstRCPFailed;
}
else #create process worked!
{
print $SysOutPointer ("RCP Data file was successful\n"
;
}
Here is the win32 code I have to convert. Any help or comments would be great.

#*****************RCP the Data File*********************************
Win32:

#Create a win32 process
$ProcessObj->SetPriorityClass (NORMAL_PRIORITY_CLASS); #set the priority
$ProcessObj->Wait(INFINITE); #wait until the process is finished
$ProcessObj->GetExitCode($ExitCode); #get the exit code, it should be 0 when successful
if ($ExitCode != 0) #RCP failed
{
print $SysOutPointer ("!!!!!!!!!!!!!!!!!!!!!!!!ERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"

print $SysOutPointer ("RCP failed to Upload Transfer file\n"

print $SysOutPointer ("!!!!!!!!!!!!!!!!!!!!!!!!ERROR!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n"

$ErrorStatus = $main::ConstRCPFailed;
}
else #create process worked!
{
print $SysOutPointer ("RCP Data file was successful\n"

}