Upstart must reserve JOB_PROCESS_SCRIPT_FD

Bug #1582199 reported by Konstantin Khlebnikov on 2016-05-16
This bug affects 2 people
Affects Status Importance Assigned to Milestone

Bug Description

JOB_PROCESS_SCRIPT_FD (9) is used for passing script into /bin/sh
But it isn't reserved so it could be owned by any library which could close it at any time.

In my case that fd was used by nss sss which closes it each lookup or something.
As a result job start fails with "/bin/sh: 0: Can't open /proc/self/fd/9" in log.

Fix: uptart must call somehing like dup2(1, JOB_PROCESS_SCRIPT_FD) as early as possible to reserve that fd.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers