[slurm-users] run bash script in spank plugin
    Tueur Volvo 
    huitre39 at gmail.com
       
    Wed May 30 08:16:50 MDT 2018
    
    
  
Hello i have question, how run in background bash script in spank plugin ?
in my spank plugin in function : slurm_spank_task_init_privileged
i want to run this script :
system("nohup bash -c 'sleep 10 ; touch /tmp/newfile.txt' &");
i want to run in independant process this bash script, i don't want
wait 10 seconde in my slurm plugin
i have this code :
int slurm_spank_task_init_privileged (spank_t sp, int ac, char **av) {
system("nohup bash -c 'sleep 10 ; touch /tmp/newfile.txt' &");
return 0;
}
actualy it's not work, when slurm ending to run my job, he kill my nohup command
if i  had in my c code sleep 12, my bash script work
int slurm_spank_task_init_privileged (spank_t sp, int ac, char **av) {
system("nohup bash -c 'sleep 10 ; touch /tmp/newfile.txt' &");
sleep(12);
return 0;
}
but i don't want to wait, i want to run my bash script in independant process
thanks for advance for your help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180530/3f4a7c45/attachment.html>
    
    
More information about the slurm-users
mailing list