How to synchronize apps running?



Hello,

I have a following issue: I have a application, that binds the two
other programs together in a way, that it runs them one after the
other. The issue is, that the first one is an application that opens a
number of sockets and waits for the incoming connections. The second
application connects to those sockets, transmits something and closes.
The thing is, that the first application is a Java app, while the
second one is native. And, before the first application is able to
start and open sockets, the second one runs, tries to connect, fails
and exits. I don't have any influence on that, I can only modify
sources of the first application and the "master" one. Do you have
some ideas on a nice way how master application can delay execution of
the second program? I must only say, that "sleep" is insufficient, as
I need to make it as fast as possible, so waiting for, let's say, 5
seconds and then commencing execution of the native application is out
of the question. Any ideas? Thanks in advance!

.



Relevant Pages

  • Re: How to synchronize apps running?
    ... application connects to those sockets, ... start and open sockets, the second one runs, tries to connect, fails ... sources of the first application and the "master" one. ... some ideas on a nice way how master application can delay execution of ...
    (comp.lang.java.programmer)
  • Re: Charge for moving master socket
    ... who will do extensions (and presumably move sockets) for a lot ... and is properly terminated by a BT master socket. ... I can do the extension wiring myself - in fact the house came ...
    (uk.telecom.broadband)
  • File Descriptors With High Values
    ... running out of file descriptors. ... "-1" checks and I'm nearly positive that all open sockets are being ... most of the sockets are valued over 100 and on runs where it ...
    (comp.unix.programmer)
  • Re: OT: load distribution algorithm
    ... I have a thread accepting socket connections from remote users. ... Sockets will be randomly closed by users, so the load of open sockets ...
    (comp.lang.tcl)
  • Re: SocketServer design
    ... You can have more then 64 open sockets. ... server that uses this method is the open source Cassini Web server by MS. ... queue connections and handle them via the queue. ...
    (microsoft.public.dotnet.languages.csharp)