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

CTRL-C does not work if host is not online? #14

Open
varenius opened this issue Jun 10, 2021 · 3 comments
Open

CTRL-C does not work if host is not online? #14

varenius opened this issue Jun 10, 2021 · 3 comments

Comments

@varenius
Copy link

Trying to connect to host which seems down. After waiting a long time, I want to CTRL-C, but that does not work. I'm sitting here:

oper@gyller:~$ etc '/mnt/vgosc/c21060_oe*' HOST#2642:/export/vlbi/data/c21060_oe/ --resume -m 5
2021-06-10 21:33:50.39: [etdc::ETDServer::ETDServer(etdc::etd_state&)] ETDServer starting, my uuid=xgXAgEkVvsQcNwQ5
2021-06-10 21:33:50.40: [etdc::etdc_fdptr mk_client(const T&, const etdc::detail::client_settings&) [with T = etdc::protocol_type; etdc::etdc_fdptr = std::shared_ptr<etdc::etdc_fd>]] mk_client/attempt #1/3 trying to connect to tcp:HOST:2642
^C^C

Would be good to have CTRL-C work also in this moment. I'm using the 1.0.1 release of etc.

@haavee
Copy link
Member

haavee commented Jun 16, 2021

Urgh. That is a difficult one. I have an idea of how to solve this but it'd require rewriting the signal-handling infrastructure completely. But before doing that I'd need to experiment with my ideas to see if the system could be made to work not just in my head but also according to the laws of POSIX ...

@haavee
Copy link
Member

haavee commented Jun 23, 2021

Please try this branch https://github.com/jive-vlbi/etransfer/tree/issue-14, for me it does work cancelling startup for a host that's not online; I tried this:

./etc 1.2.3.4:/dev/zero:10MB /dev/null --buffer 4000000

And then pressing ^C:

^C
2021-06-23 14:31:53.85: Failed to create etdproxy: assertion error: /Users/verkouter/src/etransfer/src/etdc_etdserver.h:190 [__m_connection] The proxy must have a valid connection
2021-06-23 14:31:53.85: Program startup cancelled by user

@varenius
Copy link
Author

Well, no cigar on this. Using the issue-14 branch, I try to run etc:

oper@gyller:/usr/local/src/etransfer/test/etransfer/Linux-x86_64-native-opt$ ./etc '/mnt/tsukuba/b21096_oe*' 1.2.3.4#2642:/export/vlbi/data/b21096oe/ -m 5 --resume
2021-09-15 13:49:46.37: [etdc::ETDServer::ETDServer(etdc::etd_state&)] ETDServer starting, my uuid=QpgQYJwAS4VOuqQajW
2021-09-15 13:49:46.37: [etdc::etdc_fdptr mk_client(const T&, const etdc::detail::client_settings&) [with T = etdc::protocol_type; etdc::etdc_fdptr = std::shared_ptr<etdc::etdc_fd>]] mk_client/attempt #1/3 trying to connect to tcp:1.2.3.4:2642

CTRL-C does nothing here, I have to "kill -9" etc to stop it.

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

2 participants