🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #411

Re: Help on Process.destroy(),......why it doesn't work.

#411
From: John McGrath [TeamB]
Date: Sat, 22 Nov 2003 16:54
21 lines
1736 bytes
On 11/21/2003 at 9:27:28 PM, David Huang wrote:

> I have a program that does Runtime.exec(a bat/sh script file), which
> will start a java process.
> 
> When I tried to destroy this process using process.destroy(), it does
> not work.

It sounds like the program you are starting is a shell, and then that
shell is starting the Java process.  The Process object you get back
refers to the shell, not the Java process.  So you are destroying the
shell, if it has not already terminated, and not the Java process.

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Technical Details
Message-ID: <3fbfa2b9@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!pd7cy2so!shaw.ca!news-out.superfeed.net!propagator2-maxim!news-in.superfeed.net!newsfeed01.tsnz.net!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3fbec8a7$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,76f0d7b0ceca596d
X-Google-Attributes: gid1089d0,public
X-Google-ArrivalTime: 2003-11-22 10:07:07 PST
From: "John McGrath  [TeamB]" <ng-b@JPMcGrath.net>
Subject: Re: Help on Process.destroy(),......why it doesn't work.
Newsgroups: borland.public.jbuilder.java.api
References: <3fbec8a7$1@newsgroups.borland.com>
User-Agent: XanaNews/1.15.7.4
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-15
NNTP-Posting-Host: 141.151.22.18
Message-ID: <3fbfa2b9@newsgroups.borland.com>
Date: 22 Nov 2003 09:54:01 -0700
X-Trace: newsgroups.borland.com 1069523641 141.151.22.18 (22 Nov 2003 09:54:01 -0700)
Lines: 21
X-Authenticated-User: jpmcgrath
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!elnk-pas-nf1!newsfeed.earthlink.net!pd7cy1no!pd7cy2so!shaw.ca!news-out.superfeed.net!propagator2-maxim!news-in.superfeed.net!newsfeed01.tsnz.net!news.xtra.co.nz!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail