libmish

Dev tools

debugging library

SHOW HN2020

libmish

A library to add a command promp (and telnet) to your programs

github.com

#command prompt#telnet#introspection#c library#debugging

82points
60comments
#771of 3,028 in 2020
Top 26%of 2020 by points

How HN took it

CuriousMostly questions and neutral comments

6 positive, 11 neutral or asking, 0 mixed, 4 critical, out of 21 comments about the project. Thread score +0.07.

Idea: 5 for, 2 againstPrivacy: 0 for, 2 againstExecution: 1 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Useful for introspecting long-running jobs and processes

    From 3 comments
    • The first thing I thought of is "I could use this to telnet into long running computation processes and force them to flush those buffers to see where they're at and how it…
      p4bl0 on HN
    • I have an existing use case for this. One of the music players that I use a lot is command line based and I start it to run with shuffle-play (i.e., play songs randomly).…
      neverartful on HN
    • Very nice. Now just need a small wrapper around ptrace to inject the library and call mish_prepare(0), so can just dynamically add it as needed to running programs.
      Quarrel on HN

Objections

  • Telnet is insecure and exposes an unauthenticated port; no security

    From 3 comments
    • Be aware that random websites can access localhost through your browser.
      amelius on HN
    • Can't complain about the security; there is no security.
      antoineMoPa on HN
    • Given the explanation from the Security section (i.e. "libmish is really made for developement purpose"), it might make more sense that telnet access is disabled by default and…
      j1elo on HN

Requests

  • Support Unix domain sockets

    From 1 comment
    • > 'telnet' on linux doesn't handle UNIX sockets Someone should write a patch to fix that. There is no reason why the telnet protocol can't be used over UNIX domain sockets. As…
      skissane on HN
  • Simpler command registration macro

    From 1 comment
    • I feel like this should be simpler: ``` MISH_CMD_NAMES(set, "set"); MISH_CMD_HELP(set, "set 'cnt' variable", "test command for libmish!"); MISH_CMD_REGISTER(set, _test_set_cnt);…
      cheez on HN

Questions

  • Can random websites access localhost through the browser?

    From 2 comments
    • Be aware that random websites can access localhost through your browser.
      amelius on HN
    • Can they? I thought this recent issue was related only to websockets?
      sadfklsjlkjwt on HN

Alternatives named

  • mpd or VLC telnet interface

    From 1 comment
  • SIGUSR1 signal handlers

    From 2 comments
    • Some tools respond to a Unix signal (https://en.wikipedia.org/wiki/Signal_(IPC)) this way, usually SIGUSR1 or SIGUSR2 though I've seen SIGCONT used too. SIGINT also, though that…
      dspillett on HN
    • Yes that's actually what I did for my last long running jobs: I trapped SIGUSR1 so that when my process receives it it flushes its buffers.
      p4bl0 on HN
  • JMX

    From 1 comment
    • In the Java world, it's very common to use JMX for that, and there are several JMX clients to read/set variables, watch logs, etc.
      tyingq on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/23446123)