Thanks for reply! I do have a notification-fd file:
# ls -hl total 12K -rw-rw-r-- 1 root root 415 Feb 14 20:04 README drwx-ws--T 2 root root 40 Feb 15 10:25 event drwxrwxr-x 5 root root 140 Feb 15 10:25 log -rw-rw-r-- 1 root root 2 Feb 14 20:04 notification-fd -rwxrwxr-x 1 root root 202 Feb 14 21:38 run drwx------ 2 root root 100 Feb 15 10:25 supervise Any other ideas? When is notification-fd opened? Cheers, Jan On Mon, Feb 15, 2016 at 11:20 AM, Laurent Bercot <[email protected]> wrote: > On 15/02/2016 10:55, Jan Olszak wrote: > >> The fdmove 1 3 operation shouts: >> fdmove: fatal: unable to move fd 3 to fd 1: Bad file descriptor >> > > That means fd 3 is not open. You need to have a notification-fd > file that contains "3". > > > If I comment this line out everything's OK. But I lose the notification >> feature, that I'm not yet using. >> > > Even if you're not using the notification feature, it doesn't hurt to > specify a notification-fd for services that support it. > > Breaking down parts of the run script: > > "fdmove 1 3" says that everything that's written to stdout from now on > will now be written to what was known as file descriptor 3. This means > that fd 3 needs to be open for writing. > > The "-1" option to s6-ipcserver means that s6-ipcserver will write a > newline to its stdout when it's ready. So it will notify readiness to > the file descriptor that was known as 3 before running the script. > > So you need to have a proper notification-fd file containing 3. If > you don't, fd 3 won't be open, and "fdmove 1 3" will fail. > > Don't worry about publishing readiness notifications even if nobody is > listening. Publishing is a very light operation. > > -- > Laurent > >
