* sysv_shm.cc (shmget): Allow to retrieve shared memory segments
by shmid when IPC_KEY_IS_SHMID is set.
This commit is contained in:
parent
5c7b73ed97
commit
d2714c5eda
@ -1,3 +1,8 @@
|
||||
2004-03-30 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* sysv_shm.cc (shmget): Allow to retrieve shared memory segments
|
||||
by shmid when IPC_KEY_IS_SHMID is set.
|
||||
|
||||
2004-03-02 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* sysv_sem.cc (semundo_adjust): Check for process id instead of
|
||||
|
@ -808,6 +808,12 @@ shmget(struct thread *td, struct shmget_args *uap)
|
||||
mode = uap->shmflg & ACCESSPERMS;
|
||||
if (uap->key != IPC_PRIVATE) {
|
||||
again:
|
||||
#ifdef __CYGWIN__
|
||||
if (uap->shmflg & IPC_KEY_IS_SHMID)
|
||||
segnum = shm_find_segment_by_shmid ((int) uap->key) ?
|
||||
IPCID_TO_IX((int) uap->key) : -1;
|
||||
else
|
||||
#endif
|
||||
segnum = shm_find_segment_by_key(uap->key);
|
||||
if (segnum >= 0) {
|
||||
error = shmget_existing(td, uap, mode, segnum);
|
||||
|
Loading…
Reference in New Issue
Block a user