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):
- a "server" - background process stays running in memory , can accept , process commands (requests)
- 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:
- (windows) messages
- shared memory , command queue (producer-consumer)
- shared file (just listing here completeness, i'd advise against particular 1 case)
- named pipes
- sockets (thanks reminding me of in comments, can't believe missed that!)
Comments
Post a Comment