| Store | Cart

Re: spinoff of -- untethered child process [on unix w/special parameters]

From: Francisco Zarabozo <fzar...@hotmail.com>
Thu, 4 Aug 2016 14:23:59 -0500
If you are on Solaris, then you should be able to effectively fork and exec:

#########################
fork and exec ("perl", "tasker.pl", $taskserialized);
#########################

...or, if you want to pass the whole call as a single argument to system, 
try removing the new line characters before apssing it:

#########################
$taskserialized =~ s/\n+//g;
system("perl tasker.pl $taskserialized &");
#########################

HTH

Francisco Zarabozo



-----Mensaje original----- 
From: list...@triad.rr.com
Sent: Thursday, August 04, 2016 1:49 PM
To: acti...@listserv.ActiveState.com
Subject: spinoff of -- untethered child process [on unix w/special 
parameters]

I need to do the same on solaris but pass separate sets of parameters 
(ultimately quoted properly) one of which is a serialized var created using 
data dumper.

$taskserialized looks like this
$VAR1 = {
          'TASKID' => '15459',
          'RUNONCE' => 'yes',
          'SERVER' => 'LOCALHOST',
          'TASK' => 'CHECKCM',
        };


so something like
   system("perl", "tasker.pl", "$taskserialized");

but this call also needs to fork to the background


Using & as 4th parameter does not produce the desired results and passing 
one parameter system("perl tasker.pl $taskserialized &") does not pass 
$taskserialized properly

TIA for assistance.
_______________________________________________
ActivePerl mailing list
Acti...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs 

_______________________________________________
ActivePerl mailing list
Acti...@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Recent Messages in this Thread
list...@triad.rr.com Aug 04, 2016 06:49 pm
Francisco Zarabozo Aug 04, 2016 07:23 pm
Messages in this thread