Skip to main content
Tweeted twitter.com/#!/StackUnix/status/568775768584687618
added reference to man bash
Source Link

Sometimes when I want to logout quickly I do kill -15 -1. I've noticed that bash is ignoring SIGTERM.

I wonder what's the rationale for such bash behavior?

It's not very UNIX'y to ignore SIGTERM without a good reason, isn't it?

UPDATE:

same (no)effect for all:

$ kill -TERM $$
$ type kill
kill is a shell builtin
$ command kill -TERM $$
$ /bin/kill -TERM $$

UPDATE2:

From man bash:

When bash is interactive, in the absence of any traps, it ignores SIGTERM

So it's done on purpose. But why?

Sometimes when I want to logout quickly I do kill -15 -1. I've noticed that bash is ignoring SIGTERM.

I wonder what's the rationale for such bash behavior?

It's not very UNIX'y to ignore SIGTERM without a good reason, isn't it?

UPDATE:

same (no)effect for all:

$ kill -TERM $$
$ type kill
kill is a shell builtin
$ command kill -TERM $$
$ /bin/kill -TERM $$

Sometimes when I want to logout quickly I do kill -15 -1. I've noticed that bash is ignoring SIGTERM.

I wonder what's the rationale for such bash behavior?

It's not very UNIX'y to ignore SIGTERM without a good reason, isn't it?

UPDATE:

same (no)effect for all:

$ kill -TERM $$
$ type kill
kill is a shell builtin
$ command kill -TERM $$
$ /bin/kill -TERM $$

UPDATE2:

From man bash:

When bash is interactive, in the absence of any traps, it ignores SIGTERM

So it's done on purpose. But why?

added update
Source Link

Sometimes when I want to logout quickly I do kill -15 -1. I've noticed that bash is ignoring SIGTERM.

I wonder what's the rationale for such bash behavior?

It's not very UNIX'y to ignore SIGTERM without a good reason, isn't it?

UPDATE:

same (no)effect for all:

$ kill -TERM $$
$ type kill
kill is a shell builtin
$ command kill -TERM $$
$ /bin/kill -TERM $$

Sometimes when I want to logout quickly I do kill -15 -1. I've noticed that bash is ignoring SIGTERM.

I wonder what's the rationale for such bash behavior?

It's not very UNIX'y to ignore SIGTERM without a good reason, isn't it?

Sometimes when I want to logout quickly I do kill -15 -1. I've noticed that bash is ignoring SIGTERM.

I wonder what's the rationale for such bash behavior?

It's not very UNIX'y to ignore SIGTERM without a good reason, isn't it?

UPDATE:

same (no)effect for all:

$ kill -TERM $$
$ type kill
kill is a shell builtin
$ command kill -TERM $$
$ /bin/kill -TERM $$
Source Link

Why does bash ignore SIGTERM?

Sometimes when I want to logout quickly I do kill -15 -1. I've noticed that bash is ignoring SIGTERM.

I wonder what's the rationale for such bash behavior?

It's not very UNIX'y to ignore SIGTERM without a good reason, isn't it?