palantir / palantir/go-java-launcher

go-init should respect the cmdline when checking if the process is running

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

Nobody has claimed this yet.

Dominant language
Go
Stars
76
Forks
29
Avg merge
11h 34m
Merged PRs (30d)
25

Description

What happened?

go-init does not respect the cmdline when checking for if a process is running. https://refspecs.linuxbase.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
A really easy way to confirm this is

echo $$ > var/run/foo.pid
service/bin/init.sh status

I fixed one case in https://github.com/palantir/go-java-launcher/pull/130 when the pid didn't match a process. But that is not enough.

What did you want to happen?

go-init should follow the sls-spec.

Contributor guide

No contributing guide indexed for this repository

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 running service/bin/init.sh status with a PID file containing the shell's PID, then trace the go-init process-running check that the script invokes. Compare the check with the linked LSB specification and verify that status considers the process command line, including the case where the PID does not match a process.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.