system("ipcrm -m9") won't return

Chuan Chee ckchee at dgp.toronto.edu
Mon Nov 12 19:45:58 AEST 1990


I'm using SCO Xenix 2.2.3 on a 386.
Here's the scenerio.  There are 11 shared-memory segments (0 to 10).
Segment 9 is used by 3 programs, attached as read-write.
All 3 are terminated by SIGTERM (kill -15).
1 program starts up while the other 2 waits until the first
has initialized.
As part of the initialization, the first program will get the
existing segment (9) and delete it and then create it again.
However, the deletion is done with a system("ipcrm -m 9")
which never returns.
Through another shell, "ps -elf" tells me that "sh -c ipcrm -m 9"
is still running with its parent-pid as the first program.
It is running chewing up all spare cpu time.
Interestingly enough, "ipcs" shows that segment 9 has been deleted.

Is ipcrm hanging around because the original 3 (dead) programs didn't
detach before dying?
.



More information about the Comp.unix.xenix.sco mailing list