Sponsored Content
Top Forums Shell Programming and Scripting CD Rom Locked by shell process Post 302215716 by jiju.jacob on Thursday 17th of July 2008 04:50:45 AM
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..
 

10 More Discussions You Might Find Interesting

1. 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

2. 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

3. 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

4. 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

5. 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

6. 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

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

8. 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

9. 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

10. 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
halmount(1)							   User Commands						       halmount(1)

NAME
halmount - mount and umount filesystems via hal SYNOPSIS
halmount [OPTIONS]... <device|label> [mountpoint] halmount -u [OPTIONS]... <device|label|mountpoint> halmount -e [OPTIONS]... <device|label|mountpoint> DESCRIPTION
halmount can mount and umount filesystems via hal. Hotpluggable devices and media such as USB sticks and CD-ROMs are typically not entered into /etc/fstab and are therefore not mountable by normal users via the mount(8) command. Instead hal provides methods to mount and umount such devices. Additionally it's also possible to eject devices. For devices like USB sticks eject means the device cannot be mounted again until the stick is re-plugged, ie a "save remove" feature. OPTIONS
-t TYPE specify the file system type to use -o OPTIONS specify mount options -v verbose listing of devices -u umount specified device -e umount and eject specified device -a perform requested mount/umount/eject operation all available devices --listudi list UDIs of devices, useful for debugging EXAMPLES
halmount list all mountable devices known to hal halmount /dev/hdc mount device hdc on default mount point (/media/volumelabel) halmount /dev/hdc cdrom mount device hdc on /media/cdrom halmount -u "Holiday Pictures" umount device that has the label "Holiday Pictures" SEE ALSO
mount(8), umount(8), eject(1), fstab(5) SUSE Linux November 2006 halmount(1)
All times are GMT -4. The time now is 04:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy