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

Race condition between EOF & MSG_EXIT #44

Open
jeremybobbin opened this issue Jan 29, 2021 · 0 comments · May be fixed by #45
Open

Race condition between EOF & MSG_EXIT #44

jeremybobbin opened this issue Jan 29, 2021 · 0 comments · May be fixed by #45

Comments

@jeremybobbin
Copy link

Run abduco -c abc sh, then echo $$ > pid and detach.
Kill sh: kill $(cat pid), then run: echo | abduco -a abc.

Sometimes, it reads the EOF before the server can respond MSG_EXIT.

jeremybobbin added a commit to jeremybobbin/abduco that referenced this issue Jan 30, 2021
If dvtm dies, and you run `:|abduco -a session`, abduco will often exit
without giving you the exit code, and without removing the socket from
~/.abduco.

We resolve this by first sending the client either an EXIT or an empty
CONTENT packet.

Only after the client recieves it, we set the socket to non-blocking.

Fixes: martanne#44
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

Successfully merging a pull request may close this issue.

1 participant