Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Your 2 applications shoud communicate. There are a lot of ways to do that:</p> <ul> <li>Send messages through sockets. This way the 2 processes can run on different machines if you use normal network sockets instead of local ones.</li> <li>If you are using C you can use semaphores with <a href="http://linux.die.net/man/2/semget" rel="nofollow">semget</a>/<a href="http://linux.die.net/man/2/semop" rel="nofollow">semop</a>/<a href="http://linux.die.net/man/2/semctl" rel="nofollow">semctl</a>. There should be interfaces for that in other languages.</li> <li>Named pipes block until there is both a read and a write operation in progress. You can use that for synchronisation.</li> <li>Signals are also good for this. In C it is called <a href="http://linux.die.net/man/2/sendmsg" rel="nofollow">sendmsg</a>/<a href="http://linux.die.net/man/3/recvmsg" rel="nofollow">recvmsg</a>.</li> <li><a href="http://www.freedesktop.org/wiki/Software/dbus" rel="nofollow">DBUS</a> can also be used and has bindings for variuos languages.</li> </ul> <p><strong>Update:</strong> If you can't modify the processing application then it is harder. You have to rely on some signs that indicate the progress. (I am assuming you processing application reads a file, does some processing then writes the result to an output file.) Do you know the final size the result should be? If so you need to check the size repeatedly (or whenever it changes).</p> <p>If you don't know the size but you know how the processing works you may be able to use that. For example the processing is done when the output file is closed. You can use strace to see all the system calls including the close. You can replace the close() function with the <a href="http://uberhip.com/people/godber/interception/html/slide_6.html" rel="nofollow">LD_PRELOAD</a> environment variable (on windows you have to <a href="http://en.wikipedia.org/wiki/DLL_injection" rel="nofollow">replace dlls</a>). This way you can sort of modify the processing program without actually recompiling or even having access to its source.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload