Hi,
Depends on the process. If it stores its pid in a file, You can do it
like this:
> cat /my/process/pidfile.pid | xargs kill
remeber, that if You do it using exec task in ant, You will need to set
executable to for example /bin/bash and specify the command I wrote as
<arg line="-c '...'"/>
Best regards,
Chris
Agarkar, M (Milind) wrote:
Thanks Jan.
Any idea about how to trap a PID on-the-fly ? It would be a script to run automatically.
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 28 November 2007 13:24
To: user@ant.apache.org
Subject: AW: Stopping a process identified by name
No, there is no build-in task for that.
You could use <exec> in combination of a system command "kill" and the process
id ...
Jan
-----Ursprüngliche Nachricht-----
Von: Agarkar, M (Milind) [mailto:[EMAIL PROTECTED]
Gesendet: Mittwoch, 28. November 2007 14:05
An: Ant Users List
Betreff: Stopping a process identified by name
Hi,
Is there a way to stop/kill a process running on unix using the ant
script ? Would I need to write a custom task ?
Thanks,
Milind
_____________________________________________________________
This email (including any attachments to it) is confidential, legally
privileged, subject to copyright and is sent for the personal
attention of the intended recipient only. If you have received this
email in error, please advise us immediately and delete it. You are
notified that disclosing, copying, distributing or taking any action
in reliance on the contents of this information is strictly
prohibited. Although we have taken reasonable precautions to ensure no
viruses are present in this email, we cannot accept responsibility for
any loss or damage arising from the viruses in this email or
attachments. We exclude any liability for the content of this email,
or for the consequences of any actions taken on the basis of the
information provided in this email or its attachments, unless that
information is subsequently confirmed in writing. If this email
contains an offer, that should be considered as an invitation to
treat.
_____________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Krzysztof Kucybala
Software Engineer
GFI Informatique for
Orange - France Telecom Group
790 avenue du docteur Maurice Donat
Batiment Marco Polo - D1
06250 Sophia-Antipolis
email: [EMAIL PROTECTED]
tel: 04.97.12.62.05
skype: krzysztof.kucybala
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]