micro-editor / micro-editor/micro

micro does not die when killing crontab and using micro as editor

Open
#2,085 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
29.6k
Forks
1.4k
Avg merge
2d 18h
Merged PRs (30d)
10

Description

launching crontab with micro as editor, and then killing crontab (the entire terminal) causes micro to stay alive (other editors like vim does not exhibit this behaviour) and micro goes from eating ~0% cpu to eating ~40% cpu forever untill killed
sending a SIGTERM to the process does NOT kill it, but does cause it to drop its cpu usage from ~40% to ~13%
sending a SIGKILL does kill it as expected

how to reproduce

  1. open a GNU/Linux terminal of choice (i use konsole)
  2. execute EDITOR=`which micro` crontab -e
  3. kill the terminal by clicking the [x] (i used xkill instead)
  4. open a process monitorer (i use KSysGuard) and sort processes by cpu usage

Specifications

Version: 2.0.8
Commit hash: cfcb2e45
Compiled on February 21, 2021

OS: 5.9.16-1-MANJARO
Terminal: konsole (with zsh)

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 reproducing the issue with EDITOR=which micro crontab -e, then kill the Konsole terminal and observe micro in a process monitor. Compare its behavior with SIGTERM and SIGKILL as described. Done means micro exits when the terminal or crontab session is killed, without leaving a persistent high-CPU process.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, linux, zsh
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 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.