Terminate single instance of process -
not sure if possible here goes. have simple server set multiple clients execute program. each time client executes script start program, new instance of program starts. when client stops program execution thru script, instance of program killed. problem if client on server @ same time running program instance killed also. there way connect particular instance particular client?
here more detail. server used stream media internet. have streaming devices attached tvs. when particular channel selected, sends signal server in turn runs several scripts, 1 being script start video conversion process thru program called ffmpeg. ffmpeg coverts stream, saves folder on server making available streaming device/tv. each time user starts channel, instance of ffmpeg starts because converting different stream. once user ends viewing, device sends signal server thru php script, in turn runs script called cleanup. cleanup script bat file kills ffmpeg , deletes files no longer needed. works great except if 1 individual elects stop viewing while other continues. don't know how tell difference between each instance of ffmpeg. don't want kill instances 1 connected 1 particular stream needs end. have capability of obtaining each device ip address when user first selects channel. there anyway link ip particular instance?
actually took advice above , renamed each instance ip, stored ip in temp file, able match ip making cancel call.
Comments
Post a Comment