docker / docker/docker-credential-helpers

Unable to create background process from store process

Open
#261 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
1.3k
Forks
195
Avg merge
1d 20h
Merged PRs (30d)
5

Description

I'm trying to background a process, and this is just an example code that triggers the behavior... I realize it isn't working code.

code:

case "$1" in
  "store")
    (
    while :
    do
      echo "sleeping..." > /dev/tty
      sleep 30
    done
    ) &
  exit 0
   ;;
esac
[...]

When I run the credential helper manually from the command line like this, it works and spits me back out to a command prompt:
echo '{ <JSON> }' | docker-credential-blah store

But when I use podman to log in:
podman login url.com

It asks for username and password (from the "get" process) but then just hangs once it gets to the "store" process.

I even tried moving the background code to a separate script and running that, but it still waits for that code to finish before continuing on. I think it must be waiting for all the child processes to complete.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the hang with podman login url.com and the docker-credential-blah store example, then trace how the get and store processes are launched and waited on. Done means identifying why the background child keeps the store operation open and confirming the behavior is corrected without breaking the credential helper flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, go
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.