jkramer / shell-fm

Lightweight console-based radio player for Last.FM radio streams.
228 stars 43 forks source link

deamon mode hangs upon commands #16

Closed neurino closed 13 years ago

neurino commented 13 years ago

Self-explanatory: $ shell-fm -i localhost -p 54311 -d

$ echo "info %v" | nc localhost 54311

prints "100%" then hangs, I tried a lot of commands and now they all sit in my ps

$ ps | grep nc 13214 root 0:00 nc localhost 54311 13393 root 0:00 nc localhost 54311 13588 root 0:00 nc localhost 54311 13982 root 0:00 nc localhost 54311 14205 root 0:00 nc localhost 54311 19176 root 0:00 nc localhost 54311 28882 root 0:00 grep nc

I compiled it in PuppyLinux. Old version 0.7 never gave problems (except did not scrobbled and that's why I updated it)

Thanks for your support

neurino commented 13 years ago

So no answers? It only happens to me???

In the meanwhile I restored old version, the one that did not scrobbled...

Thank you

postmann commented 13 years ago

Possibly this is due to standard-netcat behavior. Netcat waits until the connection is closed by the "other side". There's an "-q time_in_seconds" option which quits netcat after x seconds.

neurino commented 13 years ago

I worked flawlessly without any option to nc before so I wonder why can't this be restored also in last version...

Also wait x seconds is not what I call a good response to a command in a software... :)

Cheers

jkramer commented 13 years ago

Sorry for ignoring you. shell-fm doesn't directly close your session after the first command anymore, but you're now able to send multiple commands, one per line. The session will stay open until you send the "detach" command. So it's a feature, not a bug. :)

neurino commented 13 years ago

well I compiled last source from repo time ago and did not experience the same problem again... strange. So you say I should send a command and then follow with detach to get response?

I need it for this: http://murga-linux.com/puppy/viewtopic.php?t=59777

I'll check it out, thanks.