Skip to content

preact watch doesn't kill the process when the stdin pipe is closed #357

@Ch4s3

Description

@Ch4s3

Npm Version: 5.3.0
Node version: 8.0.0
OS: macOS Sierra 10.12.16

Do you want to request a feature or report a bug?
Bug
What is the current behavior?
I run preact watch by running npm run dev, which runs preact watch. But I'm doing this from a process run by another app that serves as the backend. This a app correctly spins up preact watch, but when it shuts down and closes the stdin pipe, the preact process keeps running, which I believe is not the correct behavior.

If the current behavior is a bug, please provide the steps to reproduce.
You should be able to reproduce this by running a bash script like the following:

#!/bin/bash
PORT=8080 npm run watch

Then exit with ctrl-c and run ps -ax | grep 'preact watch', you will likely see something like:

 4845 ??         0:03.29 node /Users/your_user_name/your_project/node_modules/.bin/preact watch

What is the expected behavior?
I would expect preact watch to follow the unix standard and it should either fork and persist, or it should kill itself when stdin closes. Preferably it would kill itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions