* Re: cannot set terminal process group
2017-12-14 23:48 cannot set terminal process group DGSJ
@ 2017-12-14 23:26 ` Jonathan de Boyne Pollard
[not found] ` <9a3b8835-00a1-2bb9-7fbb-2e47e723ad5d@ntlworld.com>
1 sibling, 0 replies; 3+ messages in thread
From: Jonathan de Boyne Pollard @ 2017-12-14 23:26 UTC (permalink / raw)
To: supervision
DGSJ:
> Well, Crtl+C doesn't work, [...]
>
It seems to be the time of year for this question. I just answered
another variant of it, complete with daemontools-style chain loading
tools. Read the further reading and other questions, too.
* https://unix.stackexchange.com/questions/410318/
* https://unix.stackexchange.com/questions/255385/
* https://unix.stackexchange.com/questions/338214/
^ permalink raw reply [flat|nested] 3+ messages in thread
* cannot set terminal process group
@ 2017-12-14 23:48 DGSJ
2017-12-14 23:26 ` Jonathan de Boyne Pollard
[not found] ` <9a3b8835-00a1-2bb9-7fbb-2e47e723ad5d@ntlworld.com>
0 siblings, 2 replies; 3+ messages in thread
From: DGSJ @ 2017-12-14 23:48 UTC (permalink / raw)
To: supervision
Hello,
I didn't pay too much attention to this message displayed after login,
mainly because everything seems to go well enough.
login:
Password:
-bash: cannot set terminal process group (193): Inappropriate ioctl for device
-bash: no job control in this shell
[ ~ ]#
Well, Crtl+C doesn't work, but until now I could cope with it, but now
that I'm progressing in the migration I would like to fix it.
I'm using agetty for the ./run file of the service.
/etc/sv/getty-3/run
#!/bin/sh
exec /sbin/agetty 38400 tty3 linux
And this is the output of ps -fx:
1 ? Ss 0:00 runit
192 ? Ss 0:00 runsvdir -P /service log:...................
193 ? Ss 0:00 \_ runsv getty-3
201 ? S 0:00 | \_ /bin/bash ./run
215 ? S 0:00 | | \_ /usr/local/bin/svlogd -tt /tmp/agetty3
224 ? S 0:00 | \_ /bin/login --
285 ? S 0:00 | \_ -bash
It seems that bash is expecting PID 193 to be a terminal, but it finds
runsv instead (maybe due to the effect of exec).
I could change agetty to getty in order for managing the terminal, but
before I would like to understand the problem and a possible solution.
What is then the reason for that warning and what could be the solution?
Thank you in advance for your cooperation
--
-------------------------
Daniel Gutiérrez San José
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: cannot set terminal process group
[not found] ` <9a3b8835-00a1-2bb9-7fbb-2e47e723ad5d@ntlworld.com>
@ 2017-12-15 10:33 ` Laurent Bercot
0 siblings, 0 replies; 3+ messages in thread
From: Laurent Bercot @ 2017-12-15 10:33 UTC (permalink / raw)
To: supervision
Indeed, runit does not run the service as a session leader by default.
runsvdir runs every instance of runsv in a different session, but a
runsv instance runs its service in the same session.
The workaround, as Jonathan pointed out, is to add "setsid"
(or "chpst -P") to your run script, in the command line that execs into
your daemon.
Note that s6 runs the service as a session leader by default,
precisely to avoid that minor annoyance. There is no benefit in running
the supervisor processes in a different session from the scanner
process, but there is benefit in running the services in their own
session.
--
Laurent
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-15 10:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-14 23:48 cannot set terminal process group DGSJ
2017-12-14 23:26 ` Jonathan de Boyne Pollard
[not found] ` <9a3b8835-00a1-2bb9-7fbb-2e47e723ad5d@ntlworld.com>
2017-12-15 10:33 ` Laurent Bercot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).