Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Disabling job control in bash
Date: Sun, 09 Nov 2008 21:20:21
Message-Id: 200811092320.05316.alan.mckinnon@gmail.com
1 Hi all,
2
3 I need to disable job control on a machine with 650+ users because way too
4 many of them believe that Ctrl-Z is how you kill processes. So, I want Ctrl-Z
5 to basically do nothing. I've found a great solution:
6
7 set +m
8
9 on the command line this enables monitor mode, disables job control and makes
10 sure that Ctrl-Z does nothing. It's a perfect solution, as of these 650+
11 users, at least 200 are experienced on Unix and can be trusted. If they
12 decide to use zsh, or run 'set -m' or undo this setting in their profile,
13 then they obviously know enough to be trusted and equally obviously know how
14 to use job control. They can then do that with my complete blessing.
15
16 But 'set +m' does not have the intended effect in the shell start up files
17 (*profile) and bash does not seem to have a command line switch to enable it.
18 Does anyone know how to get the effect of set +m when bash starts?
19
20 alan
21
22 p.s. various other solutions have been tried such as recompiling bash and
23 putting the original outside the regular PATH, disabling the Ctrl-Z keystroke
24 entirely, and using a restricted shell. None of these are suitable, I've
25 already tried and they cause insane amounts of toruble for valid users. 'set
26 +m' is exactly what I want, I just need to get it to work :-)
27
28 --
29 alan dot mckinnon at gmail dot com

Replies

Subject Author
[gentoo-user] Re: Disabling job control in bash Christer Ekholm <che@××××××.se>