Shell – Why does `exit &` not work

exitshell

I don't understand why exit & does not work. Why does it not?

Best Answer

I think it works. But probably it doesn't do what you expect.

 $ exit &

Will create a sub-shell process, and make it run as a background job which will just finish right away.

Related Question