Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Sending command (input parameter for app) to running process

    I have a game engine (chess, stockfish) running from terminal. After the engine run, it will register it self as process with certain ID. If I type certain command (UCI command) in the console where I run the engine, it will processing it and print some output.

    Question : If I open another console, from other console how do I send a certain command to the running engine/process?

    Should I write another application to do it? Then type
    ../LocationOfTheApp/NameOfTheApp [CMD2BSend] [RecieverID]
    or can do
    /proc/[receiverID] [command or the input]

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    It depends! In your case, it seems that the game console is using stdin for input. Injecting data into that stream is not simple (though doable). Many such apps allow you to send messages via the network, so you can use tools such as telnet, netcat, etc to communicate with it,. In your case, I don't know enough to say.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts