Skip to content

Interactive shells cannot use job control #41

@pete-woods

Description

@pete-woods

Description

When starting an interactive BASH session, you get the error:

bash: no job control in this shell

This is because BASH cannot manage process groups, due to the lack of the below code:

	if cmd.SysProcAttr == nil {
		cmd.SysProcAttr = &syscall.SysProcAttr{}
	}
	cmd.SysProcAttr.Setsid = true
	cmd.SysProcAttr.Setctty = true

You can see creack PTY doing it here. I had to add the above code explicitly in my SSH server to work around.

https://github.com/creack/pty/blob/edfbf75025b0ba4ee17c19f52d9b600fad80a787/start.go#L18

I'm guessing you must somehow skip that pathway through creak when starting processes on UNIX.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions