CD Rom Locked by shell process


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting CD Rom Locked by shell process
# 1  
Old 07-17-2008
CD Rom Locked by shell process

Hi,
I am writing a multi-cd spanning installer for a particular software in Linux (Redhat 4 or greater / Suse )

My Program is in Java. A Shell Script is used to fork the java process. I found out that when the Installer tries to go to the next disc when prompted so, by the installer, the eject command or the umount command is not able to eject / unmount the CD which is already there in the drive.

The eject / umount reports that the device is busy.

Now I tried to find out the process which is accessing the CD-ROM device and the output of command
fuser -m /cdrom0

gives me the PID of the shell process which was used to launch this Java process.

Please note that the Java Process has a separate PID. Also please note as soon as the user launches the shell command for the installer, I copy the files to the temporary directory and then cd to the temporary dir location and then fork the java process from there.

How can i solve this problem ? How can i make the mount of the second and subsequent CD Drives work without this issue ?

Thanks,
Jiju


Double post - thread closed

Last edited by jim mcnamara; 07-17-2008 at 06:02 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to kill the process when the file is locked?

I was trying to read the file to create a table in SAS and I got error as follows while I read. Resource is write-locked by another user. File =/usr/sas/sas_config/Lev1/SASApp/StoredProcessServ​er/Logs/SASApp_STPServer_2015-09-29_tmp_18208.log. System Error Code = 0. ERROR: File is in... (10 Replies)
Discussion started by: Ram Kumar_BE
10 Replies

2. UNIX for Dummies Questions & Answers

remote cd-rom

Hi, I am using a PC with XP at my office and using Solaris 9 via X-win32 (Sun WS is somewhere at server room). Is there anyway to use my pc's CDROM to install programs to Solaris 9 ..? ( they dont share the same file system. They are only connected through net. However, they both use same... (3 Replies)
Discussion started by: titanic
3 Replies

3. Shell Programming and Scripting

Kill a process from parent shell within a shell script

Hi, I am looking for a solution for the following problem: Im Using tcpdump within a shellskript started in a subshell by using brackets: ( /usr/sbin/tcpdump -i ... -c 1 ) - I want the outout of tcpdump saved in a variable - Than tcpdump-Process in the Subshell should be killed - and I... (6 Replies)
Discussion started by: 2retti
6 Replies

4. Shell Programming and Scripting

Shell Script to Kill Process(number of process) Unix/Solaris

Hi Experts, we do have a shell script for Unix Solaris, which will kill all the process manullay, it used to work in my previous env, but now it is throwing this error.. could some one please help me to resolve it This is how we execute the script (and this is the requirement) ... (2 Replies)
Discussion started by: jonnyvic
2 Replies

5. Solaris

Unable to use CD-ROM

I've been having some problems with the CD/DVD drive in my V480 server. I've decided to try to boot from the Solaris DVD (to rule out the Solaris 10 OS as a culprit). I get the following errors when I try to boot from the DVD Rebooting with command: boot cdrom Boot device:... (6 Replies)
Discussion started by: soliberus
6 Replies

6. Solaris

cd rom to dvd rom drive swap

Hello, I need to replace a cd rom drive with a dvd rom drive in a SunFire v120 running Solaris 8. My objective is to install Solaris 10 from dvd disc. Downloading Solaris 10 cd discs is not an option since I am in Baghdad, Iraq and connection speeds are horrible. So far, all I can get is power to... (9 Replies)
Discussion started by: 555
9 Replies

7. UNIX for Advanced & Expert Users

Process accounting and Shell process time

Hi All, I am running the following accounting on one of my executable, $ accton /home/myexe-acct $ ./myexe $ accton When I check the process timings I get the below result, Shell process time: 300ms myexe time: 100ms I want to know on why the shell(sh) process is taking so much time... (1 Reply)
Discussion started by: santoshbr4
1 Replies

8. Shell Programming and Scripting

Shell script that would check if the CD-rom is readable

Hi, I was wondering if there's a command in Linux that would check to see if a CD is inserted into CD-rom. I am developing a shell script that would copy a file from CD rom. For this, I have to first verify if the CD has been inserted or not. Can anyone help me? Thanks, Sundeep (1 Reply)
Discussion started by: eamani_sun
1 Replies

9. UNIX for Dummies Questions & Answers

cd rom device

Hi All, I would like to mount a cd device on a sun using the mount command. But i do not know what device the cd drive is ie /dev/sr0 or /dev/cdrom0 bla bla. I need this info to run the command... mount /dev/blah /mnt/cdrom so i can access the cd. but i dont know what blah in the above is.... (1 Reply)
Discussion started by: rkap
1 Replies

10. Linux

cd-rom

I'm getting started on Linux coming from Windows. I've got Red Hat 8.0 (I think 8.0) installed. I'm going to install a program from the cd-rom. I hope this isn't to stupid of a question, how do I install it? I've done some research unfortunately I don't have a lot of time on my hands and I haven't... (3 Replies)
Discussion started by: seedogg99
3 Replies
Login or Register to Ask a Question
java-functions(7)						RPM Java packaging						 java-functions(7)

NAME
java-functions - Functions library for Java applications. Written for the JPackage Project <http://www.jpackage.org/>: SYNOPSIS
set_jvm() Set the java virtual machine. Use a JAVA_HOME if defined, or try to find it from java command set_classpath() Set the classpath - this functions requires a valid JAVA_HOME, JAVACMD, and JAVA_LIBDIR. JARs could be specified as an argument, or via ADDITIONAL_JARS variable. set_javacmd() set the JAVACMD variable. Options should be passed via JAVACMD_OPTS variable. set_flags() set FLAGS variable. They could be specified as an argument, or via ADDITIONAL_FLAGS variable. set_options() set OPTIONS variable. They could be specified as an argument, or via ADDITIONAL_OPTIONS variable. run() run the application. It executed a following command. If VERBOSE is defined, then it prints the command to stdout. exec $JAVACMD $FLAGS -classpath $CLASSPATH $OPTIONS $MAIN_CLASS "$@" set_jvm_dirs() set JVM-related directories (JVM_LIBDIR, JAVA_VERSION, JAVAVER_LIBDIR and JAVAVER_JNIDIR variables). Requires a correct JAVA_LIBDIR, JAVA_HOME and JAVA_CMD. link_jar_repository() links a jar repository. Options could be found in build-jar-repository(1) find_jar() finds a specific extention (jar or directory). Requires a correct JAVA_LIBDIR, JAVAVER_LIBDIR and JVM_LIBDIR. Used by find-jar(1) com- mand. do_find_jar() core routine used by find_jar() check_java_env() checks java environment - the JAVA_HOME, JAVACMD, JAVA_LIBDIR, JNI_LIBDIR variables. DESCRIPTION
This is a library of generic shell functions which should be used on jpackage.org compatible distributions. FILES
/use/share/java-utils/java-functions shell script functions library for Java applications /etc/java/java.conf system-wide Java configuration file ~/.java/java.conf user's Java configuration SEE ALSO
Regular Manual Pages build-jar-repository(1) find-jar(1) java.conf(5) jpackage-utils(7) AUTHORS
Guillaume Rousse <guillomovitch@sourceforge.net> Ville Skytta <scop at jpackage.org> David Walluck <david@jpackage.org> Nicolas Mailhot <Nicolas.Mailhot at laPoste.net> REPORTING BUGS
Report bugs using JPackage Bugzilla (http://www.jpackage.org/bugzilla/) jpackage-utils 1.7.5 February 2009 java-functions(7)