Dave Gilbert <[EMAIL PROTECTED]> writes:

>   I'm trying to debug a weird problem with Xine - its screwing up its use
> of shared memory for regions I haven't sussed yet.  One odd consequence is
> that it has apparently successfully managed to allocate a 0 byte chunk of
> shared memory; shmat is then called with shmaddr=0 and shmflg=0; the
> result of shmat is 0
> 
>   Is this what shmat is supposed to do in this (admittedly odd)
> circumstance? The error behaviour is defined in the man page as returning
> -1 on error.

Yes, this should be competely legal and wanted. Some programs use
shmget (..,0,..) to test if the segment is there. Apparently Xine does
this while setting the IPC_CREATE flag. This is legal on 2.4 (wasn't
in 2.2) and gives you a 0 byte segment.

shmat will give you then the legal address 0 like mmap would.

Greetings
                Christoph

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to