Skip to content

Dev server process not terminated by SIGINT when loader is stuck #6958

@Josh-Cena

Description

@Josh-Cena

Have you read the Contributing Guidelines on issues?

Prerequisites

Description

If the loader has an infinite loop or any other bug that causes it to get stuck, the dev server keeps running even when SIGINT is sent.

Discovered while working on facebookincubator/infima#219

Reproducible demo

No response

Steps to reproduce

  1. Init
  2. Change the options:
        docs: {
          sidebarPath: require.resolve('./sidebars.js'),
          // A hopeless infinite loop
          remarkPlugins: [() => { while (true); }],
        },
  1. yarn start
  2. Oh no, page stuck. SIGINT (Ctrl + C) to the rescue
  3. yarn start again
  4. [WARNING] Something is already running on port 3000. Probably:
  5. What? Run lsof -i tcp:3000 => The dev server process is indeed still running
  6. Use the force: kill -9 47874

Expected behavior

SIGINT should be able to stop the dev server

Actual behavior

It keeps running in the background and listening on port 3000. Probably the compile process is never hung properly...

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its execution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions