jirka-h / haveged

Entropy daemon ![Continuous Integration](https://github.com/jirka-h/haveged/workflows/Continuous%20Integration/badge.svg)
GNU General Public License v3.0
273 stars 34 forks source link

Repeat the haveged command will abort #29

Closed zjxcliangyun closed 4 years ago

zjxcliangyun commented 4 years ago

After the haveged service was started, then repeat the haveged command : /usr/sbin/haveged -w 1024 -v 1 --Foreground The command will abort. The reason is that the "sys/entropy/haveged"socket is already used and can not create again, so cmd_listen return -1. But the program is not care about the error ,then FD_SET will raise abort.

jirka-h commented 4 years ago

Fixed with 193b3320bbe98cbecd465c87a8116f6047c66fa6

jirka-h commented 4 years ago

Thanks for reporting it. We now disable command mode when there is another haveged instance already running.

PrinterFranklin commented 4 years ago

@jirka-h hi, why can't just error_exit when socket_fd < 0? With the community's patch, haveged will be waiting after input "/usr/sbin/haveged -w 1024 -v 1 --Foreground".