- char * cmd = buffer+sprintf(buffer, "swarm -p ");
- if (master.o->encrypt)
- cmd = cmd+sprintf(cmd, "%d -e", port+1000);
- else
- cmd = cmd+sprintf(cmd, "%d -u", port);
-
- if (np > 0)
- cmd = cmd+sprintf(cmd, " -n %d", np);
- sprintf(cmd, " -m $(echo $SSH_CONNECTION | awk \'{print $1}\')");
- log_print(3, "Master_absorb", "Execing %s", buffer);
- execlp("ssh", "ssh", "-f", addr, buffer, NULL);
+ ssh_exec_swarm(s, NULL, sv+1, np); // start swarm remotely forward it to the socket
+ ssh_thread_add(s); // add the ssh to the thread