Commit Briefs



Omar Polo

rework how the daemon is automatically spawned

The previous way introduce possible races if multiple `amused' instances try to start the daemon. The new approach is heavily lifted from how tmux does it, but with some minor differences. If the initial connect fails we try to grab a lock to safely execute the daemon only one time. In fact we try to connect one more time even when we hold the lock because another instance can grab the lock, start the daemon and release it between the failure of connect and the first flock. It also changes slightly how the program behaves and how the -d option works. Now running `amused' without arguments is a synonym for `amused status' and the -d option only works if no arguments were given and if the daemon wasn't running.



Omar Polo

bump date




Omar Polo

rework `load' description




Omar Polo

keep the current song if load input was generated by show -p

`amused show -p' generates a listing in the form of song > current song song ... This adds an heuristic to `amused load' so that the current song can be set if it's prefixed by "> ". It's particularly useful when re-importing the state from a previous run.


Omar Polo

reuse main_senderr


Omar Polo

typo (tags/0.1)



Omar Polo

don't crash when trying to play a directory

with pledge(sendfd) we can't send a fd that represents a directory, so we have to check before and eventually skip.