8364822: Comment cleanup, stale references to closeDescriptors and UNIXProcess.c

Reviewed-by: kevinw, rriggs
This commit is contained in:
Guanqiang Han 2025-08-07 14:11:46 +00:00 committed by Kevin Walls
parent bc3d865640
commit 83953c458e
4 changed files with 5 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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) ||