dthree / wat

Instant, central, community-built docs
MIT License
495 stars 25 forks source link

CLI REPL requires two ^C to exit #5

Closed Qix- closed 9 years ago

Qix- commented 9 years ago

Hitting CTRL+C once puts wat into a weird, hung state and requires a second CTRL+C to actually exit.

dthree commented 9 years ago

Yeah - I'm going to fix this with vantage, but I have to do more research on how that stuff works.

Qix- commented 9 years ago

Depending on how you have it now, CTRL+C sends SIGINT to the process. Pretty sure node has these abstracted across platforms, and you can register a SIGINT handler to handle the event gracefully.

dthree commented 9 years ago

Thanks! Will use that data.

dthree commented 9 years ago

Okay, updated Vantage to allow graceful sigint as well to allow a middlware function to be specified on sigint.

It terminates with one CONTROL + C, and for good measure says goodbye in one of 12 langauges :fire: