Hi, I'm trying to create a simple distributed system model in C where a central controller regulates the communication between several machines. The controller's job is firstly spawning client process in several hosts.

In my understanding to do this you needs to have a connection with the target host but the target host must already have a process in the first place (TCP socket programming).

Is there any alternative to creating a process (I'm going to use fork() and execl() to do this) in remote machine hosts?

7 Years
Discussion Span
Last Post by jephthah

The way you describe it, no. You cannot fork into another system.
Usually you may assume that a target is running xinetd or some equivalent, and that it is properly configured. It will do the forking and execing on your behalf. Man xinetd and xinetd.conf.


you could have your master broadcast a UDP packet that the clients will be looking for and that can start what ever you want them to do.

but yes, you will have to assume the clients have some amount of preconfiguration already done, and a process running that looks for network activity.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.