2

I have a process that i run with this command:

java -jar loginserver.jar &

I need to be able to send commands to this program. I've tried bg/fg but apparently it doesn't persist thru sessions. Is there any other way I can do this?

4
  • What type of input do you need to send?
    – EEAA
    Oct 11, 2012 at 4:05
  • Just text. Commands like 'shutdown 10' where 10 is the number of minutes before it shuts down.. etc. I've also tried echo "shutdown 10" > /procs/pid/fd/0 with no success. The bg/fg works but only in the same ssh session.
    – Tar
    Oct 11, 2012 at 4:05
  • Are the only commands that you're trying to send shutdown or restart commands? Are you trying to run this as a daemon rather than just a process within your shell session? Oct 11, 2012 at 5:31
  • This is a loginserver. I can send commands to shutdown worlds for a game I'm hosting. The commands are interpreted by the loginserver, so they can really be whatever. Shutdown was just an example.
    – Tar
    Oct 11, 2012 at 5:55

1 Answer 1

-1

Try screen (http://linux.die.net/man/1/screen).

Not the answer you're looking for? Browse other questions tagged .