i'm coding on a program with ipc and i still don't have a garbage collector function.

when i make ipcs in the shell it shows me al msg / sem / shm.

my problem is i don't want to remove every sem separatly like "ipcrm sem 45458". how can i set a command the removes me every sem from the user xyz?

i'm not an expert in pipelining, but that would be the solvation?

please help me