Commit Graph

18 Commits

Author SHA1 Message Date
Daniel, Dao Quang Minh 5a87153824 fix TestNsenterAlivePid
unblock the nsenter-exec test process to let it finish succesfully

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-01-16 05:13:19 -05:00
Daniel, Dao Quang Minh f5dfd9a702 nit: reindent with indent -linux
Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
2015-01-16 04:58:30 -05:00
Daniel, Dao Quang Minh 9946e299af nsenter waits for parent signal before forking
this allows the parent to place the process into cgroup first so it can track
the children properly

Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2015-01-16 04:56:45 -05:00
Andrey Vagin 35ae1c4871 nsenter: add a macros to print errors
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-12 07:56:12 +03:00
Andrey Vagin 85cd86999f nsenter: use %m instead of strerror(errno)
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-12 07:56:12 +03:00
Andrey Vagin 0f8f0601ae nsenter: return an error if a process with specified pid is a zombie
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-12 07:56:12 +03:00
Andrey Vagin b6a1b88985 nsenter: return an error if a process with specified pid doesn't exist
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-12 07:56:12 +03:00
Andrey Vagin ecace12e5a nsenter: check errors from open(), read() and open()
Currently if nsenter is executed without /proc, it segfaulted.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-12 07:56:12 +03:00
Andrey Vagin b7e54b0b41 nsenter: add tests
Signed-off-by: Andrey Vagin <avagin@openvz.org>
2015-01-12 07:56:12 +03:00
Mrunal Patel a1ac9b1015 Use the child subreaper option only when available
Signed-off-by: Mrunal Patel <mrunalp@gmail.com> (github: mrunalp)
2015-01-06 18:30:30 -05:00
Daniel, Dao Quang Minh d6cd7ce43f define PR_SET_CHILD_SUBREAPER if not set
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-12-17 10:16:57 -05:00
Daniel, Dao Quang Minh 43842efecc reformat with indent -linux
Docker-DCO-1.1-Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com> (github: dqminh)
2014-12-15 14:39:55 -05:00
Vishnu Kannan 4c6df516ae Set child sub reaper option on nsenter to help cleanup all processes orphaned via ExecIn.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-11-19 20:14:20 +00:00
Vishnu Kannan ae08910fde Enter cgroups as part of nsenter while using systemd.
Docker-DCO-1.1-Signed-off-by: Vishnu Kannan <vishnuk@google.com> (github: vishh)
2014-08-13 23:26:27 +00:00
Michael Crosby fc05554fdb Allow comparison based on strlen of "nsenter"
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-08 15:44:18 -07:00
Michael Crosby 4d1d6185ab Add unsupported file for cross compile
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-08 12:14:48 -07:00
Michael Crosby cdff060b63 Nsenter checks for argv 0 before running
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-08 11:11:23 -07:00
Michael Crosby 86f6df8993 Move nsenter code into separate package
Signed-off-by: Michael Crosby <michael@docker.com>
2014-08-08 10:42:19 -07:00