Tag Info

New answers tagged

0

This is awkward and inconvenient, but possibly less so than the other answers: Every time your program asks for input: Get to a shell prompt — and I mean the shell that launched your program.  (I.e., the fact that you're not just running your "engine" program in the foreground suggests that you're using the terminal for something else, like maybe editing ...


0

You would need to send your application some wake-up call, so it knows when to listen to the input, and where to expect it(since running it in background separates it from the terminal process). The better solution would be(imho) creating separate program that would serve as an interface to the engine - as engine looks like your problem. Provide set of ...


1

Unlikely that is possible. In such cases typically you need to listen network port, accept() connection and read from it data, and do whatevet you need. Then you need some client app also to send data. This is how background apps typically work.


0

A small part of your problem may lie in the fact that you are doing an open inside your while (1) … read loop (without closing the resulting file descriptor in the loop).  Your code can be expected to accumulate hundreds of file descriptors for the FIFO.  Typically, after you hit a thousand, the open will start failing because of too many open files ...


0

You're only sending sizeof(float) bytes, which is only a substring of depthstring, whose actual size is strlen(depthstring)+1, not sizeof(float). One thing you could do is eliminate the conversion to and from a string. Since both processes reading a named FIFO are on the same machine (no, FIFOs don't work over NFS), you can assume that a float is ...



Top 50 recent answers are included