How to stop/kill child process?

I am creating one process, and it will call another exe.
Now both are running as a different process. When I am closing my application first process is destroyed by calling destroy method. But I can’t able to close second process.
Thanks in advance.

User845466 wrote:
thanks,
I have started my application by calling the first exe, then it will call second .exe.
when i close my application it is destroying first .exe it is not destroying the second one. Due to this when i run my app once again it is showing your application already running.This isn't a java problem at this point.
You have your "first exe".
You have your "second exe".
There are two possibilities.
1. There is something in "first exe" that allows it to terminate the "second exe"
2. There is no way to do that.
You must determine which of those it is. And that process has nothing to do with java.
If you determine that it is 1, then with that information you can then look to java to see if there is a way to invoke that. You cannot attempt to solve it with java however UNTIL you have the information.
If it is 2 then you are left with finding an OS specific way to do the following.
1. Locate the 'process' of the "second exe"
2. Use 'process' to kill "second exe"
Those steps have nothing to do with java. However once you know what those steps are it will be possible, but perhaps not easy, to implement via java (although still with OS specific functionality.)

Similar Messages

  • How to stop the running process chain

    How to stop the running process chains or infopackges...just qm status change is enought?

    BI - SM 37 - Kill the Job
    ECC - SM 50 - Kill the job

  • How to stop the backup process....

    How to stop the backup process....
    Okay, so it happens nearly everytime you synch your iPhone with your iTunes? Easy. As soon as it starts, hit the "X" in the bar where the backup process is being shown, this does NOT STOP the synching process, ONLY the backup process.
    HOWEVER, keep in mind that a few times during the week (depends how often you synch ur iPhone) it will be good to let the backup process let run fully.
    There we go. Problem solved...

    i agree its what i do i backup whenever i add a new app, or take more pics etc its exactly what i do its what ive been saying on all these threads talking about backups etc, im hoping in 2.0.1 will be bug fixes about this sort of thing...

  • Killing child process, not just the shell

    Killing child process, not just the shell
    #241 - 07/11/03 11:30 AM
    Edit post Edit Reply to this post Reply Reply to this post Quote
    Hi,
    I am working on a system for automatically testing student submissions on an introductory course about unix scripting. The program works by running a test script on a student submission, using Runtime.getRuntime().exec(). The Process object has a limited life span of 10 seconds (by default), and if it is still running after these 10 seconds, Process.destroy() is used to kill it.
    A bug exists when one of the submissions being tested times out. When the destroy() method is used it leaves a child process running... since students can also run
    some tests from the file submission client, the number of hanging processes soon adds up as they test and test again to get it right before submission. Eventually this results in too many processes and the server keels over.
    Does anyone have any ideas on killing these hanging processes?

    Not much help, but I think this is a known bug ...
    http://developer.java.sun.com/developer/bugParade/bugs/4770092.html

  • How many parallel BPEL child processes can be invoked on single BPEL server

    Hi,
    Can anyone pls let me know
    1. How many parallel BPEL child processes can be invoked on single BPEL server at same time?
    2. How number of Invoker threads, Worker threads and DB connection pools are affecting the BPEL server's listener thread spawning capacity?
    Thanks in advance.
    -S

    Hi James
    Here is my problem. I need to do this for load balancing. I have two instances of SOA Suite running on single machine, i.e. two different BPEL servers. Now i need 2 BPEL instances on each server, i.e. two SOA Suite and four BPEL instances (Two BPEL servers on each SOA Suite)
    I tried to create a new OC4J instance on my app server and named it as OC4J_new. By default OC4J instance would have these application installed:
    ascontrol
    ccore
    coreman
    datatags
    default
    esb-dt
    esb-rt
    gateway
    hw_services
    javasso
    orabpel
    orainfra
    policymanager
    ruleauthor
    rulehelp
    But when i create new OC4J instance, i can see only these applications:
    ascontrol
    datatags
    default
    javasso
    How do i get rest of the applications in my new OC4J Instance??
    I tried deploying .EAR files but it failed all the time. What are possible fixes?
    Many thanks in advance

  • [Solved] Bash: killing child processes

    I decided to make a session manager that will kill all child processes before exiting, the only problem is that it doesn't kill them all.
    I tried using the same function, and using it in conjunction with
    yes >/dev/null & bash
    yes >/dev/null & bash
    yes >/dev/null & bash
    yes >/dev/null & bash
    running in a terminal, and it sent all of them the TERM signal.
    I'm out of ideas.
    Code is here.
    The relevant section is:
    # Kill child process of given parent
    # This uses PIDs not names
    # Also prints out a list of child pids that should be killed
    # FIXME: Clean this up a bit
    kill_child_processes()
    PARENT_ID=$1
    # Find child processes and put them in the form PID%seperator%COMMAND
    local CHILD_PROCESSES=$(ps o ppid,pid,command | \
    awk "{if (\$1 == $PARENT_ID) {print \$2,\"_\",\$3;}}" | \
    sed 's| _ |%seperator%|')
    # Do this for each child
    for child in $CHILD_PROCESSES; do
    # Extract the PID and COMMAND into separate variable from $child
    local child_pid=$(echo $child | sed 's|%seperator%.*||')
    local child_command=$(echo $child | sed 's|.*%seperator%||')
    # If the child command has child processes, recurse through it
    if [ "$(ps o ppid,pid,command | awk "{if (\$1 == $child_pid) {print \$2;}}")" != "" ]; then
    kill_child_processes $child_pid
    fi
    # If the command isn't part of a blacklist, send it the TERM signal
    if [ x$(for dont_kill_command in $DONT_TERM; do \
    [ x$dont_kill_command == x$child_command ] && echo "MATCH"; \
    done) == x"" ]; then
    kill $child_pid &
    # echo the PID so we can use it later
    echo $child_pid
    fi
    done
    Thanks.
    Last edited by some-guy94 (2010-01-13 22:48:39)

    gradgrind wrote:You might like to try pkill / pgrep with the -g option?
    Unfortunately that isn't what I'm looking for, I want this to work with multiple sessions(not that difficult), and also work with other apps on other tty's.
    Currently what it does is it runs ps o ppid,pid,command x which gives a nice table
    1234 5678 command1
    1234 5679 command2
    and if the ppid matches the session's pid, it's pid is saved, and (this part is looped) if it has child processes, then the function is run on the pid, afterward the pid is killed.
    It works when I separate the function from the rest of the script, but when it is in a session it fails to work properly.
    Last edited by some-guy94 (2010-01-05 23:11:57)

  • How to Stop a BPM Process

    Hi,
    I have a scenario in which the BPM process went thru an endless loop. There was a logical flaw but the point is that there was no way to kill this process which was running through BPM . We tried RWB, BPM Engine Mointoring but with no success.
    In MONI all we see is a clock symbol next to PE icon.
    It would be really helpful if someone can tell me how to kill a process running in BPM engine.
    Both MONI and RWB tell me the message is Successful therefore cannot be stopped but internally the message is going through BPM workflow and never comes out.
    Thanks
    Ashish

    Hi Ashish,
    Logon to the ABAP stack of XI.
    Execute the transaction "SWWL" to delete the workflow items.
    Regards,
    Sridhar

  • How to stop and start process SAPOSCOL

    Hi, i have a problem with write access for saposcol program. I see that the file saposcol is read the file but its unable to wirte the same.
    Collector           : running
    Start time coll.    : Mon May 21 17:49:49 2007
    Current Time        : Mon Jun 11 13:27:51 2007
    Last write access   : Tue May 29 06:23:46 2007
    Last Read  Access   : Mon Jun 11 13:26:24 2007
    When i try to stop the saposcol i get the following error:
    igzadm> saposcol -k
    Setting Stop Flag :
    13:24:44 11.06.2007   LOG: ==== Stop Flag was set by saposcol (kill_collector()).
    13:24:44 11.06.2007   LOG: ====  The collection process will stop as soon as possible
    can't kill process 409656.
    kill: No such process
    ERROR:No reaction from collecting process 409656.
          Please kill collecting process.exes.
    Am doing this command through SID<ADM> from change directory /run.
    Please help me how to check the permission of the SIDADM to stop the services.
    I also try the same from root user but now use..
    Please guide me how to stop and start the SAPOSCOL in AIX 5.3.
    Advance Thanks.
    Suri Tyson

    Hi, i have the following permission for saposcol
    imserv:/ # ps -ef | grep saposcol | more
        root  118842  528422   0 14:02:17  pts/2  0:00 grep saposcol
    I have changed the ownership as you mentioned....
    imserv:/usr/sap/IGZ/SYS/exe/run # ./saproot.sh igz
    Preparing /usr/sap/IGZ/SYS/exe/run/brbackup ...
    Preparing /usr/sap/IGZ/SYS/exe/run/brarchive ...
    Preparing /usr/sap/IGZ/SYS/exe/run/brconnect ...
    Preparing /usr/sap/IGZ/SYS/exe/run/brtools ...
    Preparing saposcol ...
    Preparing icmbnd ...
    done
    However, i still get the error as:
    igzadm> saposcol -k
    Setting Stop Flag :
    14:12:13 11.06.2007   LOG: ==== Stop Flag was set by saposcol (kill_collector()).
    14:12:13 11.06.2007   LOG: ====  The collection process will stop as soon as possible
    can't kill process 409656.
    kill: No such process
    ERROR:No reaction from collecting process 409656.
          Please kill collecting process.
    Now the permission are set in my system as:
    igzadm> ps -ef |grep saposcol|more
      igzadm  729196  983058   0 14:13:25  pts/2  0:00 grep saposcol

  • How to stop the upload process?

    Hi,
    i had by mistake started the other upload than the required!
    How to stop the current upload process,( generally it takes lot of time to upload the data as data is huge )
    Thanks,
    Ravi

    Hi Ravi Kottur 
    Just follow the things like Sunil suggested check one more just kill the process
    manually and goto RSMO and in the Monitor QM status just Amke it red manually
    for the load which you want to stop and then go to that particular info provider
    Manage and delte the request.. 
    Hope itz clear a little atleast...!
    Thanks & Regards
    R M K
    ***Assigning pointz is the only way of saying thanx in SDN ***
    **Learning the thingz is never end process if u stop it will Be a devil if u continue it will be a divine***
    > Hi,
    >
    > i had by mistake started the other upload than the
    > required!
    >
    > How to stop the current upload process,( generally it
    > takes lot of time to upload the data as data is huge
    > )
    >
    >
    > Thanks,
    > Ravi

  • How to stop update work process

    hi
    this is mahesh
    in my dev server 3 update workprocess are running very long time .how to stop that 3 update workprocess .i am already deleted the error update record in sm13
    pls tell me how to change this work process running mode to waiting mode.pls give me solution.

    Hi mahesh,
    I guess you want to terminate the workprocesses.
    Go to SM50 select the update process you want to terminate then in menu bar goto <b>Process </b> and then select <b>Cancel without core</b>.it might take some time but the workprocess will get terminated.
    In case it takes too much of a time kill it at OS level.
    Please award points accordingly.
    Regards.
    Ruchit.
    Message was edited by:
            Ruchit Khushu

  • How to stop a triggered process chain

    Hi,
    Does anyone know how to stop a process chain? It was accidentally triggered twice and we need to stop it. Thanks.

    Hi,
    There r 2 ways to kill the job.
    One is using transation RSMO locate the job and display the status tab double click on the yellow light that is shown on the line total, a pop will come 'set overall status ' is displayed select the desired status that is red and save it. Then return to the monitor page and select the header tab double ckick on the data target right click and then goto 'manage',there should be request sitting there probably with yellow lights , highlight the line with the faulty request click the  delete button then click refresh button.
    Second is goto SM37 and click on the active selection and enter the jobname and then click excute the particulr job should appear highlight the jobname then click on the stop iconthat appears on the taskbar( 3 rd from left)
    hope it is clear.
    Regards-
    Siddhu

  • How to stop a windows process?

    How do I get hold of a running process/program under WindowsXP?
    How do I stop this process?
    # Johannes

    You should use the Java Native Interface and write some C code with the Win32 API. I don't think there is another way. You should search the MSDN for code samples for killing windows processes. And if you go ahead and do what i just suggested, then i wish you good luck and be patient!

  • How to stop running Backup process by BRTOOLS ?

    Dear All,
    We r using HP-UX -- OS for SAP system. We run backup process by DB13 TC.
    once the backup started, we can not log in  till backup process ends.
    If we want to stop this process in between then how to stop BACKUP process safely ? We have to use BRTOOLS ?
    Pl' give right method ..............

    Hi,
    Just confirm whether you are doing a disk to disk backup or disk to tape backup.
    Disk to Disk - It copies the files from oraarch filesystem to logbackup, and sapdata1,2,3... to sapbackup filesystems respectively. This is scheduled through brtools (DB13). This affects the performance tremdrously.
    Disk to Tape - This takes all the files from sapbackup and logbackup filesystems to tape. this doesnot affect the performance.
    We can kill the backup scheduled by brtools,because there is always a background job is triggered for the backup, the jobs always start with DBA*. Then kill that job, with help of pid from SAP level or OS level. but I doubt that the stopped backup can be used for recovery for future use.
    With regards
    Sudha

  • PFRD 11.1.1.4 - How to stop the In-process Reports Server

    I'm running an "out-of-the-box" PFRD 11.1.1.4 installation in Windows XP SP3.
    According with documentation:
    http://docs.oracle.com/cd/E17904_01/bi.1111/b32121/pbr_strt006.htm#BEHDJFHD
    To directly start or stop the in-process Reports Server using a URL, enter the following in your Web browser:
    http://machine_name:port/reports/rwservlet/startserver
    http://machine_name:port/reports/rwservlet/stopserver
    startserver works.
    stopserver returns:
    REP-50171 : Authentication failed.
    Tried
    http://machine_name:port/reports/rwservlet/stopserver?authid=weblogic/passwd
    same error.
    Commented the line:
    <!--security class="oracle.reports.server.RWJAZNSecurity" id="rwJaznSec"/-->
    in rwserver.conf.
    Same error.
    The only uncomented elements in "rwservlet.properties" (original configuration) are
    <server>rep_wls_reports_pfurtado-lap_asinst_1</server>
    <singlesignon>no</singlesignon>
    <inprocess>yes</inprocess>
    Did any of you managed to stop "in-process" reports server using the reports servlet?
    What credentials did you use?
    Thanks & Best Regards
    Paulo

    Thanks RZ!
    The line you mentioned was already as you described.
    According with the documentation:
    [Starting and Stopping Reports Server|http://docs.oracle.com/cd/E17904_01/bi.1111/b32121/pbr_strt001.htm#i1005629]
    If Reports Server is running as an in-process server through the Reports Servlet, issue the following URL:
    http://your_host_name:port_number/reports/rwservlet/stopserver?authid=admin user/admin password
    Note:
    authid is Reports Server's administration user name and password. In Oracle Reports 11g Release 1 (11.1.1), the default security is based on standards-based Java EE security model through Oracle Platform Security Services. For a non-secure Reports Server, this user is defined in the identifier element.
    I added the identifier element to rwserver.conf and restarted WLS_REPORTS, but after this the in-process reports server failed to start with the usual generic exception.
    I finally found the missing step in:
    How To Secure Showjobs Web Command In A Non Secured Reports Server In Oracle Report 11g? (Doc ID 1242614.1)
    The thing is that the identifier element has to be placed in the right location inside rwserver.conf:
    The needed change is:
    FROM
    <queue maxQueueSize="1000"/>
    <pluginParam name="mailServer" value="%MAILSERVER_NAME%"/>
    TO
    <queue maxQueueSize="1000"/>
    <identifier encrypted="no">....type here your user/password....</identifier>
    <pluginParam name="mailServer" value="%MAILSERVER_NAME%"/>
    So although using the default non-secure reports server, the identifier element has to be present in rwserver.conf for rwservlet/stopserver to work as described above.
    Otherwise the needed authentication will fail as described.
    Regards
    Paulo

  • How to stop th activation process of DSO in process chain

    Hi,
         we are loading the DSO by two load processand followed by activation process, but here one of the load process failed and i need to correct it manually, but when i make the failed request red in dso the next activation process is started. can i stop this activation process?, because i had to run this process after i manually correct the load request.
    thanks

    Hi,
    You can stop or kill this job, by identifying the work process number and app. server from job log of activation job. by right clicking on activation process -> display message-> you can get this details. once you know about the server and work process, then go to SM51 -> select the app server and then select the work process and cancel it from menu options.
    When you are loading 2 requests in parllel to a data target, it is always better to have an AND process before activating the Data in DSO. It will aviod this kind of errors and killing other jobs.

Maybe you are looking for

  • How to stream from iMac to TV

    Hey all, After a lot of internet searching, this still seems to be a somewhat unanswered question. I'm not interested in ATV, as you can only stream iTunes content. What I'm trying to do, if possible, is to stream whatever I'm watching on my iMac (24

  • Click Wheel iPod appears in Finder; not iTunes.

    I've had my click wheel iPod for more than 2 years now, and with the exception of all out dying on me about a year ago (the problem has been resolved), it has worked fine. However now, all of a sudden after updating to iTunes 6.0.4, my iPod is not be

  • Services

    Dear All, I want to create a service master recerd and service catalogs, purchase order for the services, maintain service entry sheet and finaly I want to make GRN and Invoice verification for the PO. Please give me the process related to services.

  • Automatic Generation of Serial Number

    Hi, i have to generate the serial number automatically with the following pattern XM-1234567.  can anyone guide me how to proceed with (Need Logic to Generate Serial Numbers) Thanks & Regards Dinesh SUbrahamanyam

  • Everything on iPhone is 2-3x its size

    And how to fix it if you can. Last night something happened to my iphone and whatever it was caused my phones display to blow up to 2-3x it's original size and now I can't see the slider to unlock and the screen doesn't respond to resizing or any inp