public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/33218]  New: Process.waiFor() Process.destroy() misbehave for childs which are not reacting to Ctrl+C SIGQUIT
@ 2007-08-28 14:56 cyberflex at mail dot ru
  2007-08-28 15:59 ` [Bug java/33218] " daney at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: cyberflex at mail dot ru @ 2007-08-28 14:56 UTC (permalink / raw)
  To: java-prs

When creating process (Process p = ...) which do not respond to Ctrl+C
then behavior of destroy or waitFor or both is incorrect.

Process blocking/discarding signal sent by Ctrl+C is not killed by destroy().
(The Process.destroy() supposed (IMHO) to kill the child process forcibly.)

After calling destroy() other method waitFor() returns immediately instead of
waiting (survived after the signal) process completion forever.

Such behavior looks to be such  a discrepancy.


Test case:
I encounted the problem when used following command line
rfcomm listen -i hci0 /dev/rfcomm0 6

rfcomm doesn't react to Ctrl+C till external connection is accepted.

Program code:

Process p =    <rfcomm ...>
p.destroy();
p.waitFor()
System.out.println("waitFor completed");





ps ax | grep rfcomm


Workaround for application:
kill such processes explicitly with "kill -9" or
kill subchildren of shell scripts by themselves using shell "trap" command.


Not sure that the issue exists in 4.2.x, I haven't one to test with
architectures I use.


-- 
           Summary: Process.waiFor() Process.destroy() misbehave for childs
                    which are not reacting to Ctrl+C SIGQUIT
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cyberflex at mail dot ru
  GCC host triplet: arm_le, x86 - native compilation


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33218


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-01-02 12:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-28 14:56 [Bug java/33218] New: Process.waiFor() Process.destroy() misbehave for childs which are not reacting to Ctrl+C SIGQUIT cyberflex at mail dot ru
2007-08-28 15:59 ` [Bug java/33218] " daney at gcc dot gnu dot org
2007-08-28 16:43 ` cyberflex at mail dot ru
2007-08-28 16:56 ` daney at gcc dot gnu dot org
2007-08-29  6:18 ` daney at gcc dot gnu dot org
2007-08-29  6:19 ` daney at gcc dot gnu dot org
2007-08-29 10:16 ` cyberflex at mail dot ru
2007-08-30  9:34 ` cyberflex at mail dot ru
2007-08-30  9:34 ` cyberflex at mail dot ru
2007-08-30  9:35 ` cyberflex at mail dot ru
2007-08-30  9:36 ` cyberflex at mail dot ru
2007-08-30  9:41 ` cyberflex at mail dot ru
2007-08-30 17:44 ` daney at gcc dot gnu dot org
2007-08-31  9:42 ` cyberflex at mail dot ru
2009-01-02 12:17 ` laurent at guerby dot net

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).