Waiting for another Process??

hello all,
I need a little help. when my application starts i need to be able to launch another process(another java application) and then kill my current one. The way i am doing it now is i fire off the other application and then do a system.exit(0). Well, this works when i test, but when a launcher is built with InstallAnywhere, it does not. When i call the system.exit to kill the current process, everything gets killed, the second app never gets launched. So, im guessing it just doesnt have enough time to start teh new process. I wanted to put some code in to wait and make sure this new process has been started before killing this current process. I am not sure how to do this. I know it is possible to get some process information using JNI, but we can not use it do to portability issues
thanks!

I beg your pardon?
You want to get a reference to the program that some code is running in? And when that program ends, you want some code in that program to do something? Regardless of the fact that the program already ended and that code doesn't exist any more?

Similar Messages

  • When server start, get "Waiting for another script to finish..." message and doesn't go anywhere.

    Hello, my engineer (Japanese) is trying to start AdobeMediaServer but he got stuck after getting "Waiting for another script to finish..." message. Any idea how to resolve this situation?
    [root@NA1SIBZDH02 /opt/adobe/ams]# ./server start
    NPTL 2.5
    chmod: changing permissions of `./tmp/': 読み込み専用ファイルシステムです
    Waiting for another script to finish...
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]# ls -l
    合計 52324
    drwxr-xr-x 15 ams  ams      4096  9月 11 17:54 Apache2.2
    -rwxr-xr-x  1 root root  1061035  9月 11 17:54 License.htm
    -rwxr-xr-x  1 root root    43374  9月 11 17:54 License.txt
    -rwxr-xr-x  1 root root    58827  9月 11 17:54 ReleaseNotes.htm
    -rwxr-xr-x  1 root root     5715  9月 11 17:54 adminserver
    -rwxr-xr-x  1 root root      871  9月 11 17:54 adobe-lq.png
    -rwxr-xr-x  1 root root     2912  9月 11 17:54 ams_icon.png
    -rwxr-xr-x  1 root root  3220552  9月 11 17:54 amsadmin
    -rw-r--r--  1 root root        6  9月 11 17:54 amsadmin.pid
    -rwxr-xr-x  1 root root 11187664  9月 11 17:54 amscore
    -rwxr-xr-x  1 root root  4331472  9月 11 17:54 amsedge
    -rwxr-xr-x  1 root root  3070840  9月 11 17:54 amsmaster
    -rw-r--r--  1 root root        6  9月 11 17:54 amsmaster.pid
    -rwxr-xr-x  1 root root     5242  9月 11 17:54 amsmgr
    drwxrwxrwx  6 ams  ams      4096  9月 11 17:54 applications
    -rwxr-xr-x  1 root root      960  9月 11 17:54 cleanup
    drwxr-x---  3 ams  ams      4096  9月 11 17:54 conf
    drwxr-xr-x  5 ams  ams      4096  9月 11 17:54 creds
    drwxr-xr-x  3 root root     4096  9月 11 17:54 documentation
    -rwxr-xr-x  1 root root 16368842  9月 11 17:54 libadbe_dme.so
    -rwxr-xr-x  1 root root   336065  9月 11 17:54 libadbe_flv.so
    -rwxr-xr-x  1 root root    59248  9月 11 17:54 libasneu.so.1
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so.2
    -rwxr-xr-x  1 root root    71263  9月 11 17:54 libcares.so.2.0.0
    -rwxr-xr-x  1 root root  1968482  9月 11 17:54 libcrypto.so.1.0.0
    -rwxr-xr-x  1 root root   162403  9月 11 17:54 libexpat.so.1
    -rwxr-xr-x  1 root root  3497472  9月 11 17:54 libfmsccme.so
    -rwxr-xr-x  1 root root  6992879  9月 11 17:54 libhds.so
    -rwxr-xr-x  1 root root   403767  9月 11 17:54 libssl.so.1.0.0
    drwxr-xr-x  2 root root     4096  9月 11 17:54 licenses
    drwxrwxrwx  2 root root     4096  9月 11 17:54 logs
    drwxr-xr-x  5 root root     4096  9月 11 17:54 modules
    drwxr-xr-x  6 root root     4096  9月 11 17:54 samples
    drwxr-xr-x  3 root root     4096  9月 11 17:54 scriptlib
    -rwxr-xr-x  1 root root     7494  9月 11 17:54 server
    -rwxr-xr-x  1 root root   300864  9月 11 17:54 shmrd
    -rwxr-xr-x  1 root root    36206  9月 11 17:54 tcSrvMsg
    drwxrwxrwx  2 root root     4096  9月 11 17:54 tmp
    drwxr-xr-x  9 root root     4096  9月 11 17:54 tools
    -rwxr-xr-x  1 root root     2411  9月 11 17:54 uninstallAMS
    drwxr-xr-x  8 ams  ams      4096  9月 11 17:54 webroot
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    [root@NA1SIBZDH02 /opt/adobe/ams]#
    ーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーーー

    A possible cause is security software (firewall) that blocks or restricts Firefox or the plugin-container process without informing you, possibly after detecting changes (update) to the Firefox program.<br />
    Remove all rules for Firefox from the permissions list in the firewall and let your firewall ask again for permission to get full unrestricted access to internet for Firefox and the plugin-container process and the updater process.
    See:
    * https://support.mozilla.com/kb/Server+not+found
    * https://support.mozilla.com/kb/Firewalls

  • SHUTDOWN: waiting for detached processes to terminate

    HI
    I have cold backups running every night and before the backup session starts, we have a cronjob 'srvctl stop -p prod' where our db servers are running on RAC.
    but starts from last saturday, our backup session for raw device failed. when look at the alert log, it gives as (example on 15th November 2006)
    Tue Nov 21 01:33:31 2006
    Thread 1 advanced to log sequence 2855
    Current log# 1 seq# 2855 mem# 0: /u01/oracle/oradata/prod/redo_1_01_01.log
    Current log# 1 seq# 2855 mem# 1: /u01/oracle/oradata/prod/redo_1_01_02.log
    Tue Nov 21 02:37:24 2006
    Reconfiguration started
    List of nodes: 0,
    Global Resource Directory frozen
    one node partition
    Communication channels reestablished
    Server queues filtered
    Master broadcasted resource hash value bitmaps
    Non-local Process blocks cleaned out
    Resources and enqueues cleaned out
    Resources remastered 13089
    147420 GCS shadows traversed, 0 cancelled, 18306 closed
    63793 GCS resources traversed, 0 cancelled
    98369 GCS resources on freelist, 162162 on array, 162162 allocated
    set master node info
    147420 GCS shadows traversed, 0 replayed, 18306 unopened
    Submitted all remote-enqueue requests
    Update rdomain variables
    0 write requests issued in 129114 GCS resources
    1 PIs marked suspect, 0 flush PI msgs
    Dwn-cvts replayed, VALBLKs dubious
    All grantable enqueues granted
    Tue Nov 21 02:37:27 2006
    Reconfiguration complete
    Tue Nov 21 02:37:28 2006
    Instance recovery: looking for dead threads
    Instance recovery: lock domain invalid but no dead threads
    Tue Nov 21 02:37:29 2006
    Shutting down instance: further logons disabled
    Shutting down instance (immediate)
    License high water mark = 90
    Tue Nov 21 02:37:29 2006
    ALTER DATABASE CLOSE NORMAL
    Tue Nov 21 02:37:29 2006
    SMON: disabling tx recovery
    SMON: disabling cache recovery
    Tue Nov 21 02:37:34 2006
    Thread 1 closed at log sequence 2855
    Tue Nov 21 02:37:38 2006
    Completed: ALTER DATABASE CLOSE NORMAL
    Tue Nov 21 02:37:38 2006
    ALTER DATABASE DISMOUNT
    Completed: ALTER DATABASE DISMOUNT
    ARCH: Archiving is disabled
    Shutting down archive processes
    archiving is disabled
    Archive process shutdown avoided: 0 active
    ARCH: Archiving is disabled
    Shutting down archive processes
    archiving is disabled
    Archive process shutdown avoided: 0 active
    Tue Nov 21 02:42:49 2006
    SHUTDOWN: waiting for detached processes to terminate.Tue Nov 21 07:16:38 2006
    Starting ORACLE instance (normal)
    Seems like it was hang when 'shutdown immediate' command is issued. can somebody help me? what should i do?
    Thanks
    Best regards,
    Nonie

    Hi nonie
    Oracle shutdown Problem
    If the following message is in the Oracle alert file:
    SHUTDOWN: waiting for detached processes to terminate
    you should change the SERVER and SRVR parameters from SHARED to DEDICATED in the file <ORACLE_HOME>\network\ADMIN\tnsnames.ora.
    http://serviceportal.fujitsu-siemens.com/i/en/support/technics/fgm/unix/nsr40a_en.htm
    hope this helps
    Taj.

  • Getting java to wait for a process to end

    I have an application running Javac i need it to wait for this process to end before it does anything else.
    I have tried using theProc.waitFor() (the Process i have created), but this hangs my application. I know there is nothing wrong with the class paths and java itself. I have checked the process list and Javac is still in it. WHY?
    Can someone suggest anything.

    http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

  • Timed out waiting for Business process

    Hi,
    I created a web application using evision in JCAPS 512. It works properly. But some times i am getting an error message as
    "Timed out waiting for business process" when i try to access the web page usign url.
    But if i invoke page again then application works properly.
    I have increased server response timeout value also. But couldn't get
    the reason when it will occur.
    Please let me know what is the reason for this problem. If this error occurs please let me know is it possible to show some other page instead of displaying error to user.
    Regards
    Venkatesh.S

    Good day.
    I have a similar problem and I have managed to pinpoint when it fails but unfortunately I don't know how to fix it yet.
    In my scenario, I have 2 separate processes:
    the first process reads data from a Seebeyond SRE instance and stores it on a local Java CAPS queue.
    The second process is an EVision process that reads the data from this queue and displays it on a page.
    Whenever I am not connected to the network linking my Java CAPS instance to the Seebeyond SRE instance (first process cannot connect ) I get this problem on the EVision side every second time I request a page. This means I can view the first message on the queue and then I have to restart the Logical Host
    This doesn't make sense to me, since The EVision process is a completely separate process, deployed in it's own WAR file.

  • BEx Analyzer Report error - microsoft office excel is waiting for another

    Hi,
    I am running a query from BEx Analyzer, it is throwing the error as " microsoft office excel is waiting for another application to complete an ole action "
    Here in variable screen, I am trying to give input for the variables, then it is throwing the above error message.

    The error message you are receiving means that an Excel macro is waiting for another macro to finish in order to proceed. It is an informational message so you understand why the system is slower than expected.
    The solution is on the Microsoft side, see BOJ Note 1201513.
    From the MSDN link below, you will see a description of the Display
    Alerts Property:
    http://msdn.microsoft.com/en-us/library/aa194195(office.10).aspx
    DisplayAlerts Property
    wdAlertsNone No alerts or message boxes are displayed. If a macro encounters a message box, the default value is chosen and the macro continues.
    The Note suggests changing the "Application.DisplayAlerts = False" to "Application.DisplayAlerts = wdAlertsNone"

  • Waiting for another script to finish...

    I can no more start or stop FMS3 server, it says :
    Waiting for another script to finish...
    According to the start script, i check
    /home/fms/tmp/script.lck and i have this file as empty, what should
    i do then ?
    Do you all have this file ? /home/fms/tmp/script.lck ?
    Jerome

    My reply is late i just read your problem after having the same, it locked up my whole Ubuntu system.
    Its easy to solve just delete the lock folder you see. Server should restart and work fine.

  • Microsoft Excel is waiting for another application to complete an Ole actio

    When I access Data Manager, I get the error message: "Microsoft Excel is waiting for another application to complete an Ole action."  When I click OK, I get another error: "Cannot download the dimension list from server.  Timeout expired.  The timeout period elapsed prior to obtaining a connection from the pool.  This may have occurred because all pooled connections were in use and max pool size was reached."  It never used to happen until recently.  I don't know what to tell the IT guys to do.  Thanks.

    This is a known error in V5. I have had this error at almost every V5 customer.
    The following solution (got it from support) solves it permanently.
    Changes have to be made to the outlooksoft.config file and the connectionstrings in tblappsetinfo. Be sure to restart the server(s) after applying these changes.
    1. In outlooksoft.config file of x:\OutlookSoft\Websrvr\bin folder on the web server change the following line:
    <add key="Database_AppServerDBConn" value="Server=<servername>;Database=AppServer;Trusted_Connection=True;"/>
    to
    <add key="Database_AppServerDBConn" value="Server=<servername>;Database=AppServer;Trusted_Connection=True;pooling=false"/>
    Please note that where I have <servername> you should put the name of your server ****
    Also, add the pooling=false; to every connection string in tblappsetinfo.
    I am sure this helps,
    Regards,
    Alwin Berkhout

  • Package deployment keeps getting stuck with message 'Waiting for another program'

    Hi, I just started working on SCCM.  We have an Orchestrator runbook which creates a collection and then creates an advertisement for packages and task sequences.  I was able to get a task sequence and a package successfully execute.  When
    creating the advertisement, I set it to RERUN_ALWAYS.  However, the next time I ran our runbook which creates the collection andadvertisement (I manually deleted the previous one), it does create them but the deployment is stuck to In Progres with the
    Description of 'Waiting for another program'.  This just happens for packages before and not for task sequences the other day but now, it's the same issue whether I use a package or a task sequence.   
    I see this in execmgr.log:
    <![LOG[Package UAT0007D, program Test is ready but can not be started because package , program  is currently running.]LOG]!><time="17:07:20.993+480" date="02-06-2015" component="execmgr" context=""
    type="1" thread="6804" file="executionrequest.cpp:9083">
    <![LOG[Raising event:
    [SMS_CodePage(437), SMS_LocaleID(1033)]
    instance of SoftDistProgramWaitingForAnotherProgram
    AdvertisementId = "UAT2011A";
    BlockingPackageID = "";
    BlockingProgramName = "";
    ClientID = "GUID:2FE27567-3215-4015-BE09-0E65F09767C8";
    DateTime = "20150207010721.004000+000";
    MachineName = "ACAA-UAT-SCCM";
    PackageName = "UAT0007D";
    ProcessID = 6316;
    ProgramName = "Test";
    SiteCode = "UAT";
    ThreadID = 6804;
    ]LOG]!><time="17:07:21.010+480" date="02-06-2015" component="execmgr" context="" type="1" thread="6804" file="event.cpp:729">
    <![LOG[Successfully raised SoftDistProgramWaitingForAnotherProgram event for program Test.]LOG]!><time="17:07:21.021+480" date="02-06-2015" component="execmgr" context="" type="1" thread="6804"
    file="executionrequest.cpp:9128">

    yes check the exemgr.log file and also see is that package has dependency for another package? and if yes then that package is already available non DP?
    Sharad Singh | My blogs: SharadTech | Twitter:
    @SinghSharaad | | Please remember to click “Mark as Answer” on the post that helps you.This can be beneficial to other community members reading the thread.

  • Waiting for another JSP to end.

    document.dados.action = "exists.jsp?familia="+familia;
    document.dados.submit();
    alert('After ');the problem is that when I execute this peace of code the exists.jsp runs AFTER
    alert('After '); this one...
    But I wanted to do that alert before this...
    I belive the question is: how can I wait in my jsp for another jsp to finish running?
    Can you help me?
    Thanks in advance.
    Jos� Neves
    Edited by: Jose_Neves on Jul 30, 2008 5:00 AM

    Here is a link with the monthly fees:
    http://www.apple.com/iphone/easysetup/rateplans.html
    You would be forced to select one of these plans and pay for the actiavtion as well as the first month up front. With the cheapest plan this will be a little over $100.

  • Thread not waiting for DOS process

    Hi
    In program I am using Threads. Here all threads will start and execute one DOS command. My problem is that all those thread needs to wait for DOS command to finish its process and then only thread should return.
    I have created ThreadGroup and added all threds. And I am checking it by using
    ThreadGroupVar.activeCount()!=0 so that I can come to know all thread processing is over or not.
    Threads are coming back to main process as soon as they start DOS command ..they are just not waiting it to be finish DOS job.
    Please guide me on this
    Regards,
    Niraj

    Create a collection of the Threads then iterate through it using join() on each one. When you have iterated though all the Threads they will all have completed.

  • Patched Deployments issue: "waiting for another installation to complete"

    I have some percent of computers which runs into above state in monthly patch deployments. I could minimal information from execmgmr, udpatesdeployment.log,
    CliSpy and Client Center etc tools but that doesn’t offer much help to nail down the issue completely. Have any of you dealt to resolve such issue successfully ? Is there any efficient way to handle this ?
    It seems I have
    DeploymentA, waiting for the completion of DeploymentB, which in turn waiting for the completion of
    DeploymentC. Is there any better approach I could take to nail down and resolve the issue. One of my finding is,  KB articles installs (SCCM R3, SCCM Asset Intelligence) causes these issue as they restart (upgrade sort of execution) the
    agent during the execution, I need to confirm these
    Vasu

    Hi Vasu,
    This issue can be caused by a deployment was previously deployed and was now deleted. This was because the clients finished installation
    and wanted to notify the Server that it is done, but since the deployment was deleted, it couldn’t Notify its progress to the site server and the CCM_DeploymentTaskEx1 got stuck.
    Please use the following scripts to delete the instance to test this issue.
    strService = "CcmExec"
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\CCM\SoftwareUpdates\DeploymentAgent")
    Set colWMISettings = objWMIService.ExecQuery("Select * from CCM_DeploymentTaskEx1")
    For Each objWMISetting in colWMISettings
    objWMISetting.AssignmentId = ""
    objWMISetting.JobId = "{00000000-0000-0000-0000-000000000000}"
    objWMISetting.Put_
    Next
    'Stop service
    Set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
    Set objService = objWMI.Get("Win32_Service.Name='" & strService & "'")
    objService.StopService()
    WScript.Sleep 10000 ' Pause to allow service to stop
    'Start service
    Set objService = objWMI.Get("Win32_Service.Name='" & strService & "'")
    objService.StartService()
    WScript.Sleep 10000 ' Pause to allow service to start
    Regards,
    Sabrina
    This posting is provided "AS IS" with no warranties or guarantees, and confers no rights. |Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
    This can be beneficial to other community members reading the thread.

  • Whether two session with for update at the same time will wait for another?

    Will this scenario happen?
    One session executes: select ... for update/select ... for update nowait
    The other session also executes: select ... for update/select ... for update nowait
    Two sessions happens at the same time unluckily. Whether they will all stand by because of "for update" or quit immediately because of "nowait"?
    Thx a lot.

    HiddenName wrote:
    This situation is called 'a deadlock'. Oracle will automaticaly detect a deadlock. One of the statements will fail with ORA-00060 deadlock detected;
    No, it's not.
    A deadlock is when sesson-A has a lock on something that session-B needs in order to continue, and at the same time, session-B has a lock on something that Session-A needs in order to continue. They BOTH have something the other needs.
    In the OP's case, at least as he described it, it is simple serialization. The one with the lower scn will go, then the next.
    PS.
    Why don't you try? You can setup a small table with some records, open 2 sessions to the same database and for example issue UPDATE statements:
    session 1: update where id=1
    session 2: update where id=2
    session 1: update where id=2 - this will hang waiting for session 2 to commit and free lock
    session 2: update where id=1 - ORA-00060
    You may also read about deadlocks in chapter on "Data Concurency and Consistency" of "Oracle Concepts'.

  • How to wait for a Process to complete without using wait,notify methods

    I have created a new Process using run.exec() method using a cmdline String array in the format "java, class name, 4 command line arguments" to be passed to the main method of that class. But I have a maximum limit of the no. of processes to be created e.g. 5. So whenever I create a process, I use a static semaphore class to decrease the count, and increase it again when the process ends; so when the 6th process wants to start it will be suspended until another process is complete. My problem is how do I communicate to the calling class that the process has ended. I don't want to create any threads as that will defeat the purpose of creating separate processes. I have tried Process.waitFor() method but it doesn't work.

    you could add a iamfinished method to the class where you store the counter and thread calls it if it is finished.

  • Waiting for Sub Process to complete

    Hi,
    Below mentioned is my requirement:
    1. Main process begins
    2. Copy a tar file from a source directory to target directory.
    3. Call a sub-process to untar the file (using MKS tool kit utility from command prompt).
    4. sub-process ends
    5. Work on the folders (untared) by applying rules.
    6. Main process ends.
    When I call sub-process like
    main() // main method
    // calling sub-process
    Process p = Runtime.getRuntime().exec(tar -xvf C:\\Source\\ -C C:\\Target);
    p.waitFor();
    // calling rules
    rule("C:\\Target"); // private method to perform validation on the untared files located in Target folder.
    //main method ends
    The program gets stuck up here.
    The file size to untar is small (1MB). But, after some time, when I kill the main process, I could see sub-process completing its task.
    Can you any one suggest me to know the sub-process completion, so that I could call my rules()

    I f you read the documentation for exec() and Process carefully you will find that when you an exec() a process, pipes are created back to the main process for the stdout and sterr of the sub-process. Those pipes have a finite size and when full the sub-process will block, hence waitFor() will wait forever.
    You need to create threads to drain stdout/stderr of the sub-process, or else re-direct the subprocess output (start a shell to run the actual command) so that the pipes won't get full and block.

Maybe you are looking for

  • Using an external drive with my iBook G4

    I have a question. I had purchased an external Seagate drive. It is supposed to be compatible for both macs and pcs. The first time I used it was at School at the computer lab where the Macs must be of a higher system than my iBook because everytime

  • Loading of data from ECC to BW initially takes time

    Hi, I am loading data from ECC to BW System. But I find that this process initially takes some time to start say for 15 minutes or so. I have no clue as to why this is happening. Could anyone help me out here. Regards, Sushanth Hulkod

  • Need some help with a case statement implementation

    I am having trouble using a CASE statement to compare values and then display the results. The other issue is that i want to put these results in a separate column somehow. Heres how the code would look: SELECT "Task"."Code", "Stat" = CASE WHEN "Task

  • Transient analysis frequency estimate

    Hi, I have a simple analog tone generator that produces a sine wave after some short startup delay.  Is there a function in Multisim that would allow me to take my transient analysis data and estimate the frequency of oscillation?  What I'm looking f

  • Sap script real time process

    hai this is siva , i want sap-script real time process.