A Hack to Work Around the Spawn Limitation

The spawn utility isn't smart enough to understand how to pass command line arguments to programs that it spawns. In other words, in the spawn.conf configuration file, each line must be of the format:
userid executable_name
If you try to put command line arguments after the executable name, then spawn will just get horribly confused.

There is a very simple way to work around this: instead of putting the name of your server program in the spawn.conf file, put the name of a shell script. Inside the shell script, launch the server program with whatever arguments you deem appropriate.

For example, let's assume you wanted to launch the program "server" as userID 10000, with the following command line:

server foo bar baz
and, you also wanted to launch a second copy of the program "server" as userID 12345, with the following command line:
server x y z

To do this, create two shell scripts, called "server10000.sh" and "server12345.sh". A shell script is simply a text file. "server10000.sh" should contain the following text:

#!/bin/bash

exec ./server foo bar bz
Similarly, "server12345.sh" should contain the following text:
#!/bin/bash

exec ./server x y z
Make sure you make both of the shell scripts executable, e.g. by issuing the following command:
  chmod 755 server12345.sh server10000.sh
Given these shell scripts, a spawn.conf file that does what you want would look like:
  10000 server10000.sh
  12345 server12345.sh