kararu 0 Junior Poster in Training

when a process is running,I need to stop it by generating a signal immdly.I tried using kill pid to generate.But what happens is signal is generated only after the current process is over.

when some signal, say sigint comes,i need to stop a process immdly..I hav to generate this signal in the middle of a process.

help me please.