Commit Graph

16 Commits

Author SHA1 Message Date
Qiang Huang e5a7aad7eb Replace aliased imports of logrus
Docker already did this: https://github.com/docker/docker/issues/11762
libcontainer should also do it.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-05-06 21:14:04 +08:00
Michael Crosby 570eed473b Move childPipe to the end of FD set
This adds a new env var for identifying the internal sync pipe that
libcontainer uses to sync with the container and parent process.  This
replaces #496 to allow the user to add additional files to the processes
and not take over fd 3 for all containers.

Closes #496

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-04-08 14:14:51 -07:00
Jörg Thalheim 708b25e61e add option to pass additional fds to container process
This can be usefull to implement socket activated containers for example.

Signed-off-by: Jörg Thalheim <joerg@higgsboson.tk>
2015-04-08 13:56:03 -07:00
Alexander Morozov cbc8dee085 Ensure that state always contains pathes to all namespaces
Thanks coolljit0725 for initial fix.

Closes #512

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-04-07 14:50:08 -07:00
Michael Crosby 46132cebcf Fix pdeathsig and ppid for supervisor running as pid1
For some reason when the supervisor of a container is PID1 the parent
death signal was being delivered to the container's init process even if
it did not die.  Also the ppid() will return 1 for a container running
in the pid namespace of it's parent and the parent is pid1.

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-04-02 13:55:55 -07:00
Mrunal Patel ca73d7aede Pass down process Capabilities and apply them if present.
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2015-03-25 15:40:32 -04:00
Qiang Huang d6eb76f8a2 add parameter to Set api
We only have libcontainer.Container on Docker side, can't change `config`
in linuxContainer, pass config to libcontainer so we can change config of
container.

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-11 16:46:54 +08:00
Alexander Morozov a9644c209f Add tty support for setnsProcess
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-03-04 17:30:37 -08:00
Mrunal Patel 903680701a Merge pull request #424 from dqminh/fix-generic-error
Fix panic when genericError constructor gets nil error
2015-03-03 20:11:37 -08:00
Daniel, Dao Quang Minh 4ce8d97320 do not pass nil to genericError
currently genericError constructors require not-nil error to be able to read
its Error() message

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-03-03 22:47:44 -05:00
Qiang Huang 1db687f4f4 add Set api
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
2015-03-04 08:42:35 +08:00
Alexander Morozov 8d0b06257b Move tty configuration to Process
Now you need to call Process.NewConsole to setup console for process

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-25 15:04:43 -08:00
Michael Crosby a36d471a0e Add init path support to allow full control of init binary
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
2015-02-24 17:53:11 -08:00
Alexander Morozov bdff595cad Use configs.NamespaceType as key for State.NamespacePathes
I think this is more convenient because for working with namespaces we
using configs.NamespaceType.

Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-24 11:54:58 -08:00
Andrey Vagin 94fb37f557 process: add Wait(), Signal() and Pid() methods
Currently we have a problem when buffers are used for std file
descriptors.  These buffers are filled from goroutines (Cmd.goroutine),
and we need to wait them to be sure that all data have been copied.

Signed-off-by: Andrew Vagin <avagin@openvz.org>
2015-02-23 23:40:41 +03:00
Alexander Morozov a1c3e0db94 Change os-prefix file naming to standard postfix naming
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
2015-02-23 10:41:26 -08:00