mirror of
https://github.com/openjdk/jdk.git
synced 2026-07-30 12:50:11 +00:00
8364822: Comment cleanup, stale references to closeDescriptors and UNIXProcess.c
Reviewed-by: kevinw, rriggs
This commit is contained in:
parent
bc3d865640
commit
83953c458e
@ -2343,8 +2343,7 @@ int os::open(const char *path, int oflag, int mode) {
|
||||
// specifically destined for a subprocess should have the
|
||||
// close-on-exec flag set. If we don't set it, then careless 3rd
|
||||
// party native code might fork and exec without closing all
|
||||
// appropriate file descriptors (e.g. as we do in closeDescriptors in
|
||||
// UNIXProcess.c), and this in turn might:
|
||||
// appropriate file descriptors, and this in turn might:
|
||||
//
|
||||
// - cause end-of-file to fail to be detected on some file
|
||||
// descriptors, resulting in mysterious hangs, or
|
||||
|
||||
@ -2251,8 +2251,7 @@ int os::open(const char *path, int oflag, int mode) {
|
||||
// specifically destined for a subprocess should have the
|
||||
// close-on-exec flag set. If we don't set it, then careless 3rd
|
||||
// party native code might fork and exec without closing all
|
||||
// appropriate file descriptors (e.g. as we do in closeDescriptors in
|
||||
// UNIXProcess.c), and this in turn might:
|
||||
// appropriate file descriptors, and this in turn might:
|
||||
//
|
||||
// - cause end-of-file to fail to be detected on some file
|
||||
// descriptors, resulting in mysterious hangs, or
|
||||
|
||||
@ -4872,9 +4872,8 @@ int os::open(const char *path, int oflag, int mode) {
|
||||
// All file descriptors that are opened in the Java process and not
|
||||
// specifically destined for a subprocess should have the close-on-exec
|
||||
// flag set. If we don't set it, then careless 3rd party native code
|
||||
// might fork and exec without closing all appropriate file descriptors
|
||||
// (e.g. as we do in closeDescriptors in UNIXProcess.c), and this in
|
||||
// turn might:
|
||||
// might fork and exec without closing all appropriate file descriptors,
|
||||
// and this in turn might:
|
||||
//
|
||||
// - cause end-of-file to fail to be detected on some file
|
||||
// descriptors, resulting in mysterious hangs, or
|
||||
|
||||
@ -372,7 +372,7 @@ childProcess(void *arg)
|
||||
jtregSimulateCrash(0, 6);
|
||||
#endif
|
||||
/* Close the parent sides of the pipes.
|
||||
Closing pipe fds here is redundant, since closeDescriptors()
|
||||
Closing pipe fds here is redundant, since markDescriptorsCloseOnExec()
|
||||
would do it anyways, but a little paranoia is a good thing. */
|
||||
if ((closeSafely(p->in[1]) == -1) ||
|
||||
(closeSafely(p->out[0]) == -1) ||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user