From a4aeef46cda1835da2b19f8f62b4526de6521e6c Mon Sep 17 00:00:00 2001 From: Donghai Qiao Date: Mon, 22 Feb 2010 13:53:44 -0500 Subject: 4492533 Filesystems may need VOP_CLOSE() for executables following a VOP_OPEN() --- usr/src/uts/common/exec/java/java.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'usr/src/uts/common/exec/java/java.c') 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); -- cgit v1.2.3