diff options
author | Donghai Qiao <Donghai.Qiao@Sun.COM> | 2010-02-22 13:53:44 -0500 |
---|---|---|
committer | Donghai Qiao <Donghai.Qiao@Sun.COM> | 2010-02-22 13:53:44 -0500 |
commit | a4aeef46cda1835da2b19f8f62b4526de6521e6c (patch) | |
tree | 88f8fa8685907fe8c2d2d5853d7dd20f7e0d5639 /usr/src/uts/common/exec/java/java.c | |
parent | 9d3952ab10f8677fdabc8594d26cc1e7d6acdfc4 (diff) | |
download | illumos-gate-a4aeef46cda1835da2b19f8f62b4526de6521e6c.tar.gz |
4492533 Filesystems may need VOP_CLOSE() for executables following a VOP_OPEN()
Diffstat (limited to 'usr/src/uts/common/exec/java/java.c')
-rw-r--r-- | usr/src/uts/common/exec/java/java.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/usr/src/uts/common/exec/java/java.c b/usr/src/uts/common/exec/java/java.c index bcf61453c9..7cf9126e8d 100644 --- a/usr/src/uts/common/exec/java/java.c +++ b/usr/src/uts/common/exec/java/java.c @@ -19,12 +19,10 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2010 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Launch Java executables via exec(2). * @@ -163,6 +161,15 @@ javaexec(vnode_t *vp, struct execa *uap, struct uarg *args, pn_free(&lookpn); error = gexec(&nvp, uap, args, &idata, level + 1, execsz, execfile, cred, EBA_NONE); + + if (!error) { + /* + * Close this Java executable as the interpreter + * will open and close it later on. + */ + (void) VOP_CLOSE(vp, FREAD, 1, (offset_t)0, cred, NULL); + } + VN_RELE(nvp); args->pathname = opath; pn_free(&resolvepn); |