Subject: | can't use IPC::Cmd->run_forked in the first process of a container |
Date: | Tue, 18 Oct 2016 12:28:53 +0200 |
To: | bug-ipc-cmd [...] rt.cpan.org |
From: | Luciano Rocha <luciano.rocha [...] booking.com> |
Hi,
When using docker or similar container technologies, the program
executed runs with pid = 1. That is common in container land, the goal
is to have only a service per container, so it doesn't make sense to
have a full init system configured.
But IPC::Cmd::open3_run is coded in a way that, if the process running
it has parent pid equal to 1, then it considers itself an orphan and
kills itself and its session.
The following patch fixes that by checking if the parent pid changed at
all.
Regards,
--
Luciano Rocha
Message body is not shown because sender requested not to inline it.