Find the answer to your Linux question:
Results 1 to 2 of 2
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 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2012
    Posts
    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
    Code:
    ../LocationOfTheApp/NameOfTheApp [CMD2BSend] [RecieverID]
    or can do
    Code:
    /proc/[receiverID] [command or the input]

  2. #2
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
    Posts
    11,406
    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
  •