Upstart must reserve JOB_PROCESS_SCRIPT_FD

Bug #1582199 reported by Konstantin Khlebnikov
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
upstart
New
Undecided
Unassigned

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.