process - C - running program accept input -


this beginner-level question in c. don't know start looking/searching.

so, if have program continuously running in c, best way accept input through command line program?

ex, mysql running, can process command call

mysql select * * 

do need different program write file/stdin?enter code here

clarification:

so, mysql seems able take in commands while running... possible in c?

goal: have hooks open gl es, , want run continuous draw loop in background, while having ability call commands such

glhookprogram make "object1" model "triangle" program "default" glhookprogram attr "object1" position "1.0, 1.0, 0.0" scale "2.0" rotation "45, 0, 0" 

this way, can have node server run hw-accelerated animations in javascript on rpi.

looks need (and i'm sorry - won't going details there plenty of sources on web that):

  1. a "server" - background process stays running in memory , can accept , process commands (requests)
  2. a "client" - (short-running?) process can accept commands user (gui, command-line. network? other process?) , send requests "server"

this not trivial task beginner. suggest googling "server-client" , "inter-process communications" first , go there.

the range of options "accept input" server includes (but not limited to) following:

  1. (windows) messages
  2. shared memory , command queue (producer-consumer)
  3. shared file (just listing here completeness, i'd advise against particular 1 case)
  4. named pipes
  5. sockets (thanks reminding me of in comments, can't believe missed that!)

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -