[crossfire] misc.c: raiseChild() problem

Bob Tanner tanner at real-time.com
Fri Jan 28 18:37:18 CST 2005


Debugging a problem where gcfclient was core dumping on a SIGPIPE when playing
with sound active.

Traced it back to cfsndsrv and misc.c:raiseChild().

Not sure who maintains this code, but the raiseChild function is not catching
the error condition when the child exits with a non-zero exit condition.

I had the wrong audio device name for linux and cfsndserv.c:init_audio() (listed
below)

int init_audio() {

  /* open the PCM device */
  if ((err = snd_pcm_open(&handle,AUDIODEV,SND_PCM_STREAM_PLAYBACK,0)) <0) {
        ALSA9_ERROR("init_audio(): ",err);
        exit(1);
  }

It seems that a child dieing is detected:

[  INFO  ] (common::monitorChilds) Child /usr/games/cfsndserv died. Removing and
closing pipes

But the death of the child isn't communicated/tracked anywhere else, so when
play_sound() is invoked it -assumes- the cfsndserv is running.

Not familiar enough with the code to determine if I should check if the
cfsndserv is alive each time I attempt to play a sound or hack on the
raiseChild() or monitorChilds().


-- 
Bob Tanner <
     
     tanner at mn-linux.org
     
     >          | Phone : (952)943-8700
     
     http://www.mn-linux.org,
     
      Minnesota, Linux | Fax   : (952)943-8500
Key fingerprint = AB15 0BDF BCDE 4369 5B42  1973 7CF1 A709 2CC1 B288

    
    


More information about the crossfire mailing list