chaserpeek
New Member
Dear People,
I'm new in this forum, and I would ask a question about PID.
I must run multiple session of my software to encode/decode some rtsp stream. Each stream open is identified with a PID.
I need to restart individual sessions of the program when it crashes.
Working with a single session, it's easy because I run a pgrep and, if he replies, I kill and recover the session with a PID.
Example: I run one session with PID 0001, and I can kill 0001 only.
Working with multiple instances, pgrep replies to me with multiple different pid's. How do I kill the crashed session only?
My idea is that I have to write a bash for each session, in which to "follow" each specific PID and check if it is working or crashing.
Do you have any ideas?
Thanks!
I'm new in this forum, and I would ask a question about PID.
I must run multiple session of my software to encode/decode some rtsp stream. Each stream open is identified with a PID.
I need to restart individual sessions of the program when it crashes.
Working with a single session, it's easy because I run a pgrep and, if he replies, I kill and recover the session with a PID.
Example: I run one session with PID 0001, and I can kill 0001 only.
Working with multiple instances, pgrep replies to me with multiple different pid's. How do I kill the crashed session only?
My idea is that I have to write a bash for each session, in which to "follow" each specific PID and check if it is working or crashing.
Do you have any ideas?
Thanks!