On Thu, 20 Mar 2003, Takashi Iwai wrote:
> At Thu, 20 Mar 2003 10:02:06 +0100,
> Kristof Pelckmans wrote:
> >
> > I wonder how you know that the number you assign is not in use...
>
> well, there is no guarantee for that.
>
> i think it would be more understandable to have the string type ipc
> key, such as
>
> pcm.dmix {
> type dmix
> ipc_key_str /usr/alsa/foo
> ...
> }
>
> which generates an ipc key via ftok().
That's a question. This is a quote from the ftok() man page:
"Of course no guarantee can be given that the resulting key_t is unique."
I think that the best solution is to create a communication file with
information about used unique IPC key and add a verification that used
IPC semaphores and IPC areas are ours.
Jaroslav
-----
Jaroslav Kysela <[EMAIL PROTECTED]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs
-------------------------------------------------------
This SF.net email is sponsored by: Tablet PC.
Does your code think in ink? You could win a Tablet PC.
Get a free Tablet PC hat just for playing. What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel