I am trying to send a command to the minecraft server jar using / proc / {pid} / fd / 0, but the server does not execute the command.
To reproduce what I'm trying to do, you can do it on a Debian-based machine (possibly in other Linux distributions).
What I use to verify this:
- Ubuntu 14.04
- minecraft_server.jar (tested since 1.8)
- OpenJDK Runtime workspace (installed with jre-headless disabled by default)
First console:
$ java -jar minecraft_server.jar nogui
Answer: [... the server starts and waits for input]
say hi
Answer: [19:52:23] [Server thread / INFO]: [Server] hello
Second console:
Now, when I switch to the second console, with the server still running in the first, I write:
echo "say hi2" >> /proc/$(pidof java)/fd/0
, . "say hi2", . , , , , .
? , /proc/ {pid}/fd/0 java jar?
, - Java-, , - - , ..
, , -f - , , , . , , - .
. - , , .