Linux Sound subsystem development
 help / color / mirror / Atom feed
* close()ing audio device always yields 'Interrupted system call' why?
@ 2000-04-02  2:08 Britton
  2000-04-02  2:12 ` close()ing audio device always yields 'Interrupted system call' Dave Mielke
  2000-04-03  3:31 ` Britton
  0 siblings, 2 replies; 3+ messages in thread
From: Britton @ 2000-04-02  2:08 UTC (permalink / raw)
  To: linux-sound


Even if I SYNC or RESET the device before closing.  The program I am
working on always writes the correct amount of data to it's data file, and
never moves less than a full (possibly dual channel) sample of data at a
time.  This return value doesn't appear to be documented in the
close() man page.  Anyone have any idea what might be causing this?

I am running 2.2.14.

Britton Kerin
__
GNU GPL: "The Source will be with you... always."

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: close()ing audio device always yields 'Interrupted system call'
  2000-04-02  2:08 close()ing audio device always yields 'Interrupted system call' why? Britton
@ 2000-04-02  2:12 ` Dave Mielke
  2000-04-03  3:31 ` Britton
  1 sibling, 0 replies; 3+ messages in thread
From: Dave Mielke @ 2000-04-02  2:12 UTC (permalink / raw)
  To: linux-sound

[quoted lines by Britton on April 1, 2000, at 17:08]

>Even if I SYNC or RESET the device before closing.  

The close() is taking a significant amount of time, and your program is
receiving a signal during that interval.

-- 
Dave Mielke           | 856 Grenon Avenue | I believe that the Bible is the
Phone: 1-613-726-0014 | Ottawa, Ontario   | Word of God. Please contact me
EMail: dave@mielke.cc | Canada  K2B 6G3   | if you're concerned about Hell.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: close()ing audio device always yields 'Interrupted system call'
  2000-04-02  2:08 close()ing audio device always yields 'Interrupted system call' why? Britton
  2000-04-02  2:12 ` close()ing audio device always yields 'Interrupted system call' Dave Mielke
@ 2000-04-03  3:31 ` Britton
  1 sibling, 0 replies; 3+ messages in thread
From: Britton @ 2000-04-03  3:31 UTC (permalink / raw)
  To: linux-sound


On Sat, 1 Apr 2000, Dave Mielke wrote:

> [quoted lines by Britton on April 1, 2000, at 17:08]
> 
> >Even if I SYNC or RESET the device before closing.  
> 
> The close() is taking a significant amount of time, and your program is
> receiving a signal during that interval.

This is apparently exactly what was happening Dave, thanks for your help.  
The guilty(?) signal turns out to be SIGCHLD, and looks like being due to
the manager thread going zombie.  The odd thing is that both the threads
finish, and return success codes, and have apparently done their jobs
correctly, but the problem still comes up when I try to close /dev/dsp,
even if I sleep() for a while before trying the close().  Is it expected
behavior for the kernel to bother the parent process with signals
regarding thread child process states, even after successful
pthread_join()s, or is this suspicious behavior on the part of the kernel
or thread library?  Why should I get this signal at the exact point where
I call close(audio_fd)?  

I thought I would ask here before pestering the kernel people, any advice
greatly appreciated, and thanks again for your help.

> -- 
> Dave Mielke           | 856 Grenon Avenue | I believe that the Bible is the
> Phone: 1-613-726-0014 | Ottawa, Ontario   | Word of God. Please contact me
> EMail: dave@mielke.cc | Canada  K2B 6G3   | if you're concerned about Hell.

Britton

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-04-03  3:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-04-02  2:08 close()ing audio device always yields 'Interrupted system call' why? Britton
2000-04-02  2:12 ` close()ing audio device always yields 'Interrupted system call' Dave Mielke
2000-04-03  3:31 ` Britton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox