public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcj/31228] New: Race condition between setting close-on-exec and Runtime.exec()
@ 2007-03-16 19:00 daney at gcc dot gnu dot org
2007-03-19 7:09 ` [Bug libgcj/31228] " daney at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-03-16 19:00 UTC (permalink / raw)
To: java-prs
Runtime.exec() could fork/exec the external process between the time a file
descriptor is opened and and when close-on-exec is set on it.
--
Summary: Race condition between setting close-on-exec and
Runtime.exec()
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: daney at gcc dot gnu dot org
GCC host triplet: *-*-*
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31228
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/31228] Race condition between setting close-on-exec and Runtime.exec()
2007-03-16 19:00 [Bug libgcj/31228] New: Race condition between setting close-on-exec and Runtime.exec() daney at gcc dot gnu dot org
@ 2007-03-19 7:09 ` daney at gcc dot gnu dot org
2007-03-23 0:06 ` daney at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-03-19 7:09 UTC (permalink / raw)
To: java-prs
------- Comment #1 from daney at gcc dot gnu dot org 2007-03-19 07:09 -------
Patch here:
http://gcc.gnu.org/ml/java-patches/2007-q1/msg00693.html
--
daney at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |daney at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Keywords| |patch
Last reconfirmed|0000-00-00 00:00:00 |2007-03-19 07:09:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31228
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/31228] Race condition between setting close-on-exec and Runtime.exec()
2007-03-16 19:00 [Bug libgcj/31228] New: Race condition between setting close-on-exec and Runtime.exec() daney at gcc dot gnu dot org
2007-03-19 7:09 ` [Bug libgcj/31228] " daney at gcc dot gnu dot org
@ 2007-03-23 0:06 ` daney at gcc dot gnu dot org
2007-03-23 0:17 ` daney at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-03-23 0:06 UTC (permalink / raw)
To: java-prs
------- Comment #2 from daney at gcc dot gnu dot org 2007-03-23 00:06 -------
Subject: Bug 31228
Author: daney
Date: Fri Mar 23 00:06:41 2007
New Revision: 123138
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123138
Log:
PR libgcj/31228
* configure.ac: Add checks for getrlimit and sys/resource.h.
* include/posix.h (_Jv_platform_close_on_exec): Remove.
* include/config.h.in: Regenerate.
* configure: Regenerate.
* gnu/java/nio/channels/natFileChannelPosix.cc (open): Remove call to
_Jv_platform_close_on_exec;
* gnu/java/net/natPlainSocketImplPosix.cc (create): Likewise.
(accept): Likewise.
* gnu/java/net/natPlainDatagramSocketImplPosix.cc (create):Likewise.
* java/lang/natPosixProcess.cc: Include sys/resource.h.
(nativeSpawn): Close all file descriptors. Don't set FD_CLOEXEC on
pipes.
Modified:
trunk/libjava/ChangeLog
trunk/libjava/configure
trunk/libjava/configure.ac
trunk/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc
trunk/libjava/gnu/java/net/natPlainSocketImplPosix.cc
trunk/libjava/gnu/java/nio/channels/natFileChannelPosix.cc
trunk/libjava/include/config.h.in
trunk/libjava/include/posix.h
trunk/libjava/java/lang/natPosixProcess.cc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31228
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/31228] Race condition between setting close-on-exec and Runtime.exec()
2007-03-16 19:00 [Bug libgcj/31228] New: Race condition between setting close-on-exec and Runtime.exec() daney at gcc dot gnu dot org
2007-03-19 7:09 ` [Bug libgcj/31228] " daney at gcc dot gnu dot org
2007-03-23 0:06 ` daney at gcc dot gnu dot org
@ 2007-03-23 0:17 ` daney at gcc dot gnu dot org
2007-03-23 0:18 ` daney at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-03-23 0:17 UTC (permalink / raw)
To: java-prs
------- Comment #3 from daney at gcc dot gnu dot org 2007-03-23 00:17 -------
The committed patch fixes the race. Too bad it had to come to this.
--
daney at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31228
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/31228] Race condition between setting close-on-exec and Runtime.exec()
2007-03-16 19:00 [Bug libgcj/31228] New: Race condition between setting close-on-exec and Runtime.exec() daney at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-03-23 0:17 ` daney at gcc dot gnu dot org
@ 2007-03-23 0:18 ` daney at gcc dot gnu dot org
2007-03-26 6:07 ` daney at gcc dot gnu dot org
2007-03-26 6:13 ` daney at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-03-23 0:18 UTC (permalink / raw)
To: java-prs
--
daney at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31228
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/31228] Race condition between setting close-on-exec and Runtime.exec()
2007-03-16 19:00 [Bug libgcj/31228] New: Race condition between setting close-on-exec and Runtime.exec() daney at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-03-23 0:18 ` daney at gcc dot gnu dot org
@ 2007-03-26 6:07 ` daney at gcc dot gnu dot org
2007-03-26 6:13 ` daney at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-03-26 6:07 UTC (permalink / raw)
To: java-prs
------- Comment #4 from daney at gcc dot gnu dot org 2007-03-26 07:07 -------
Subject: Bug 31228
Author: daney
Date: Mon Mar 26 07:07:13 2007
New Revision: 123208
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=123208
Log:
PR libgcj/31228
* configure.ac: Add checks for getrlimit and sys/resource.h.
* include/posix.h (_Jv_platform_close_on_exec): Remove.
* include/config.h.in: Regenerate.
* configure: Regenerate.
* gnu/java/nio/channels/natFileChannelPosix.cc (open): Remove call to
_Jv_platform_close_on_exec;
* gnu/java/net/natPlainSocketImplPosix.cc (create): Likewise.
(accept): Likewise.
* gnu/java/net/natPlainDatagramSocketImplPosix.cc (create):Likewise.
* java/lang/natPosixProcess.cc: Include sys/resource.h.
(nativeSpawn): Close all file descriptors. Don't set FD_CLOEXEC on
pipes.
Modified:
branches/gcc-4_2-branch/libjava/ChangeLog
branches/gcc-4_2-branch/libjava/configure
branches/gcc-4_2-branch/libjava/configure.ac
branches/gcc-4_2-branch/libjava/gnu/java/net/natPlainDatagramSocketImplPosix.cc
branches/gcc-4_2-branch/libjava/gnu/java/net/natPlainSocketImplPosix.cc
branches/gcc-4_2-branch/libjava/gnu/java/nio/channels/natFileChannelPosix.cc
branches/gcc-4_2-branch/libjava/include/config.h.in
branches/gcc-4_2-branch/libjava/include/posix.h
branches/gcc-4_2-branch/libjava/java/lang/natPosixProcess.cc
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31228
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug libgcj/31228] Race condition between setting close-on-exec and Runtime.exec()
2007-03-16 19:00 [Bug libgcj/31228] New: Race condition between setting close-on-exec and Runtime.exec() daney at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-03-26 6:07 ` daney at gcc dot gnu dot org
@ 2007-03-26 6:13 ` daney at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: daney at gcc dot gnu dot org @ 2007-03-26 6:13 UTC (permalink / raw)
To: java-prs
------- Comment #5 from daney at gcc dot gnu dot org 2007-03-26 07:13 -------
Committed to the 4.2 branch as well.
--
daney at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.0 |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31228
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-03-26 6:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-03-16 19:00 [Bug libgcj/31228] New: Race condition between setting close-on-exec and Runtime.exec() daney at gcc dot gnu dot org
2007-03-19 7:09 ` [Bug libgcj/31228] " daney at gcc dot gnu dot org
2007-03-23 0:06 ` daney at gcc dot gnu dot org
2007-03-23 0:17 ` daney at gcc dot gnu dot org
2007-03-23 0:18 ` daney at gcc dot gnu dot org
2007-03-26 6:07 ` daney at gcc dot gnu dot org
2007-03-26 6:13 ` daney at gcc dot gnu dot org
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).