@@ -16,9 +16,7 @@ const signalBufferSize = 2048
1616
1717// newSignalHandler returns a signal handler for processing SIGCHLD and SIGWINCH signals
1818// while still forwarding all other signals to the process.
19- // If notifySocket is present, use it to read systemd notifications from the container and
20- // forward them to notifySocketHost.
21- func newSignalHandler (enableSubreaper bool , notifySocket * notifySocket ) chan * signalHandler {
19+ func newSignalHandler (enableSubreaper bool ) chan * signalHandler {
2220 if enableSubreaper {
2321 // set us as the subreaper before registering the signal handler for the container
2422 if err := system .SetSubreaper (1 ); err != nil {
@@ -37,8 +35,7 @@ func newSignalHandler(enableSubreaper bool, notifySocket *notifySocket) chan *si
3735 // handle all signals for the process.
3836 signal .Notify (s )
3937 handler <- & signalHandler {
40- signals : s ,
41- notifySocket : notifySocket ,
38+ signals : s ,
4239 }
4340 }()
4441 return handler
@@ -52,16 +49,15 @@ type exit struct {
5249}
5350
5451type signalHandler struct {
55- signals chan os.Signal
56- notifySocket * notifySocket
52+ signals chan os.Signal
5753}
5854
5955// forward handles the main signal event loop forwarding, resizing, or reaping depending
6056// on the signal received.
6157func (h * signalHandler ) forward (process * libcontainer.Process , tty * tty , detach bool ) (int , error ) {
6258 // make sure we know the pid of our main process so that we can return
6359 // after it dies.
64- if detach && h . notifySocket == nil {
60+ if detach {
6561 return 0 , nil
6662 }
6763
@@ -70,15 +66,6 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach
7066 return - 1 , err
7167 }
7268
73- if h .notifySocket != nil {
74- if detach {
75- _ = h .notifySocket .run (pid1 )
76- return 0 , nil
77- }
78- _ = h .notifySocket .run (os .Getpid ())
79- go func () { _ = h .notifySocket .run (0 ) }()
80- }
81-
8269 // Perform the initial tty resize. Always ignore errors resizing because
8370 // stdout might have disappeared (due to races with when SIGHUP is sent).
8471 _ = tty .resize ()
0 commit comments