knative-extensions / knative-extensions/func-go
signal.Notify catches all signals instead of only SIGINT/SIGTERM
- Dominant language
- Go
- Stars
- 7
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
All three middleware packages (http, cloudevents, kafka) use `signal.Notify(sigs)` without specifying which signals to catch. This subscribes to all incoming signals, changing default handling for signals we don't care about (e.g. SIGCHLD, SIGPIPE).
Since the handler only reacts to SIGINT and SIGTERM, we should register only those:
```go
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
```
**Affected files:**
- `http/service.go`
- `cloudevents/service.go`
- `kafka/service.go`
Found during review of #169.
Contributor guide
Research direction
Inspect the signal.Notify calls in http/service.go, cloudevents/service.go, and kafka/service.go, starting with how each middleware handles SIGINT and SIGTERM. Update the registrations so they subscribe only to those signals, then run the repository's Go tests and confirm unrelated signals retain their default handling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100