Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

respawning esd with supervise

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
2 posts • Page 1 of 1
Author
Message
boglin
n00b
n00b
User avatar
Posts: 67
Joined: Fri Jun 07, 2002 1:57 am
Location: Kingston, ON

respawning esd with supervise

  • Quote

Post by boglin » Thu Nov 25, 2004 3:03 am

I am posting because I am certain this is not the optimal solution; I'm hoping that some experts around the forum can give me some tips....

I had a small problem using EsounD(esd) on a computer connected to me stereo. I wanted xmms on my other pcs to pipe to EsounD on the stereo computer, which it did; it's only that it would do it once, and then I would have to restart /etc/init.d/esound. Did a little searching on google and found that RedHat has some kind of problem that is similiar, in so much as the posts showed during my search.

Anywho: I decided to use the daemontools package's supervise to keep esd alive. so I made a /service/esd directory. and edited /services/esd/run:

Code: Select all

#!/bin/bash
source /etc/conf.d/esound
/usr/bin/esd -- $ESD_START $ESD_OPTIONS
Made a new init-script: /etc/init.d/esd (instead of esound):

Code: Select all

#!/sbin/runscript
depend() {
        use net portmap alsasound
}

start() {
        rm /service/esd/down
        ebegin "Starting es daemon"
        start-stop-daemon --start --quiet --background --exec /usr/bin/supervise -- /service/esd/
        eend $?
}

stop() {
        ebegin "Stopping es daemon"
        touch /service/esd/down
        /usr/bin/svc -kx /service/esd/
        kill $(pidof esd)
        eend $?
}
Pretty simple, right? The wierd thing is that the "kill $(pidof..." is neccessary or else there is always an esd process hanging around after "#/etc/init.d/esd stop". Same result when "exec fghack" is prepended to the line in "run".
I supposed I should mention that this does succefully respawn esd; so now I can change tracks in xmms locally w/o ssh'ing to the box to restart esound.

Thoughts? Comments? Suggestions?
Top
nx12
Apprentice
Apprentice
User avatar
Posts: 193
Joined: Wed Jan 14, 2004 4:31 pm

  • Quote

Post by nx12 » Thu Jul 14, 2005 9:17 pm

Hmm, I've got the same problem, though I use a simple dirty

Code: Select all

a=1; while [ $a ]; do esd  -d hw:0 -as 2; done
But I would be glad to know if someone solved this problem without hacks. Thanks in advance.
signature sucks
Top
Post Reply

2 posts • Page 1 of 1

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic