emacs-eldev / eldev

Elisp development tool
https://emacs-eldev.github.io/eldev/
GNU General Public License v3.0
226 stars 17 forks source link

Two problems with eldev emacs --fg-daemon #68

Closed pidu closed 2 years ago

pidu commented 2 years ago

Trying to run eldev emacs --fg-daemon I notice two problems compared to running same emacs command without eldev.

  1. Ctrl-c will leave the emacs process running
  2. The output is not relayed to STDOUT
doublep commented 2 years ago

It's a problem with Elisp, it doesn't really allow precise control over child processes. E.g. this is a trivial wrapper over cat in shellscript:

#!/bin/sh
cat
echo done

It "parrots" all the text lines you enter and prints "done" at the end, if you terminate it with C-d (i.e. make stdin close). You can also abort it with C-c. But I don't know if it is possible to reproduce this in Elisp anyhow, e.g. with emacs --batch --load some-script.el. At least I didn't find any way when trying ideas from #25.

doublep commented 2 years ago

Fixed in Eldev 1.2.