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
pseudo(1)						      General Commands Manual							 pseudo(1)

NAME
pseudo - Starts a non-STREAMS pty interface for a STREAMS device SYNOPSIS
pseudo [-l] [-shell shell] OPTIONS
Starts a shell process as the login shell. By default, the command starts this process as an interactive shell. Specifies the shell to be started. By default, the command starts the shell set by the SHELL environment variable. DESCRIPTION
The pseudo command provides an appropriate interface for STREAMS tty devices that are installed on systems configured to use the non- STREAMS pty driver. The pseudo command opens a pair of master and slave pty devices, and starts a shell process. The command's options allow you to override the default shell specification and to specify that the process be started as a login shell. NOTES
The pseudo command is available only when one or more of the Tru64 UNIX optional subsets with worldwide support software are installed on your system. In order for the pseudo command to provide a non-STREAMS pty interface for STREAMS devices, the system must be configured to use the non- STREAMS pty driver. If the system is configured to use the STREAMS pty driver, the command provides a STREAMS pty interface. SEE ALSO
Commands: stty(1) Interfaces: pty(7) pseudo(1)