Seems to appear when stderr is a terminal and not stdin or stdout.
Signed-off-by: Scott Parlane <scott.parlane@alliedtelesis.co.nz>
if (pid == 0) {
if (options->attach_flags & LXC_ATTACH_TERMINAL) {
- ret = pthread_sigmask(SIG_SETMASK,
- &terminal.tty_state->oldmask, NULL);
- if (ret < 0) {
- SYSERROR("Failed to reset signal mask");
- _exit(EXIT_FAILURE);
+ if (terminal.tty_state)
+ {
+ ret = pthread_sigmask(SIG_SETMASK,
+ &terminal.tty_state->oldmask, NULL);
+ if (ret < 0) {
+ SYSERROR("Failed to reset signal mask");
+ _exit(EXIT_FAILURE);
+ }
}
}