Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When running as daemon, CPU usage is constantly at 100% #103

Open
cmpitg opened this issue Jul 1, 2019 · 0 comments
Open

When running as daemon, CPU usage is constantly at 100% #103

cmpitg opened this issue Jul 1, 2019 · 0 comments

Comments

@cmpitg
Copy link

cmpitg commented Jul 1, 2019

One of my use case with reptyr is with -L, to start an Emacs server process with an allocated PTY. Running reptyr -L emacs --fg-daemon=<server-name> works as expected. Unfortunately, when integrating the command with Runit[^1], the CPU usage caused by reptyr was constantly at 100%:

#!/usr/bin/env sh

exec 2>&1
exec reptyr -L emacs --fg-daemon=<server-name>

At first I thought was Emacs being mischievous. However, this happened even with simple shell scripts such as the following:

#!/usr/bin/env bash

while true; do
    echo $(date -R)
    sleep 1
done

The CPU usage came back to normal when running without reptyr -L. Any idea what might be the cause?

[^1] http://smarden.org/runit/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant