On 2010-03-08, Pádraig Brady <p...@draigbrady.com> wrote: > > Also what about the case where a command usually > behaves normally and exits when it gets a TERM, > but sometimes it hangs and needs a KILL which > you specify with timeout. You wouldn't want to > change the TERM into a KILL in that case.
That is actually exactly my case, but I could live with sending it a KILL all the time. > > Perhaps we could handle all cases with > the equivalent of: > > if (sig==TERM && user_sig==KILL) { > send(sig); /* give chance to term gracefully */ > sleep(1); > send(KILL); /* nuke it from orbit */ > } Good idea, that would solve all my problems, and at the same time it changes the interface for other users very little. A SIGNALS section in the man page explainig this might also be a good idea. Can you tell me what version of coreutils this change will end up in? Thanks, -- Kim Hansen Vadgårdsvej 3, 2.tv 2860 Søborg Fastnet: 3956 2437 -- Mobil: 3091 2437