LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-20-2005, 04:46 PM   #1
CooManChu
Member
 
Registered: Dec 2004
Location: Chicago, IL
Distribution: Ubuntu 10
Posts: 46

Rep: Reputation: 15
Clearing Resource Lock After Abnormal Termination


Hi,

Is there a way (other than rebooting) to clear the lock a program has on a resource if the program abnormally terminates?

From time to time, xine will crap out on me and when it does, it keeps its hold on my sound output device (/dev/dsp). At this point, I cannot re-launch xine or launch any application that uses sound without rebooting (just leaving the GUI and going back in via startx is not enough).

Since xine's crashing seems to be pretty regular unless all you do is watch a DVD with your hands completely off the keyboard and mouse and sit about 8 feet away from the monitor, re-booting is getting to be cumbersome. A quicker way to release all the resources that xine had would be great for me aside from getting xine to stop crashing.

Thanks.
 
Old 01-20-2005, 05:04 PM   #2
avarus
Member
 
Registered: Apr 2004
Location: Oxford, UK
Distribution: Ubuntu, Debian, various
Posts: 230
Blog Entries: 5

Rep: Reputation: 33
Hi,

The 'fuser' command is the one which tells you what programs are holding what files. Since in Linux every resource is represented by a file, as you have seen, this should therefore tell you what if anything is holding the sound device. You will probably find /dev/dsp is a symlink, so use ls -l to see where it points, then do eg:

fuser -vu /dev/dsp0

and see what that says - you will get the name and PID of any process holding the file.

If there is no such process, this could be a bug in the kernel where the device is not resetting itsself. RedHat 9 uses the old OSS drivers by default, so you may want to experiment with ALSA.

Hope that was informative,

TIM
 
Old 01-20-2005, 06:20 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Xine may still have processes running in the background. You could enter 'killall -9 xine' to kill these processes. This works for me after Civilization bombs on me occassionally. I use 'killall -9 civctp' and the sound returns.
 
Old 01-22-2005, 11:04 AM   #4
CooManChu
Member
 
Registered: Dec 2004
Location: Chicago, IL
Distribution: Ubuntu 10
Posts: 46

Original Poster
Rep: Reputation: 15
Thanks avarus and jschiwal for the useful suggestions.

I'll try them both. I've been thinking about experimenting with ALSA, so maybe this woudl be a good reason to try. It's just that now that I have everything pretty much working and fairly stable, I hate to mess it all up - but I will anyway.

Thanks again.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) phreakshew Linux - Newbie 24 04-12-2019 10:42 AM
Question about abnormal program termination ghoughto Programming 5 06-15-2005 07:04 AM
Abnormal traffic? xathras Linux - Security 4 05-08-2005 04:13 PM
Abnormal font sizes... Nazxul Linux - Software 3 02-06-2005 01:28 PM
installation exit abnormal !!!! meshmesh Linux - General 3 01-27-2004 12:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration