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

dump_reports_on_exit does not work #133

Closed
klaus3000 opened this issue Jan 24, 2017 · 1 comment
Closed

dump_reports_on_exit does not work #133

klaus3000 opened this issue Jan 24, 2017 · 1 comment
Labels

Comments

@klaus3000
Copy link

Using dsc from today 94f680a
After kill <pid>:
dsc[25206]: Received signal 15 while dumping reports, exiting later
dsc[25206]: unable to pcap thread run: system error, check errno
dsc[25206]: system error [4]: Interrupted system call (select())

IMO the first log message is confusing, it should be something like: "Received signal 15 while capturing, dumping last report, exiting later"

@klaus3000
Copy link
Author

strace:

select(11, [9 10], NULL, NULL, {1, 0})  = 1 (in [9], left {0, 1979})
poll([{fd=10, events=POLLIN}], 1, 0)    = 0 (Timeout)
gettimeofday({1485241232, 48895}, NULL) = 0
select(11, [9 10], NULL, NULL, {1, 0})  = 1 (in [9], left {0, 1392})
poll([{fd=10, events=POLLIN}], 1, 0)    = 0 (Timeout)
gettimeofday({1485241233, 49431}, NULL) = 0
select(11, [9 10], NULL, NULL, {1, 0})  = ? ERESTARTNOHAND (To be restarted if no handler)
--- SIGTERM {si_signo=SIGTERM, si_code=SI_USER, si_pid=3676, si_uid=0} ---
sendto(3, "<30>Jan 24 07:00:33 dsc[3482]: Received signal 15 while dumping reports, exiting later", 86, MSG_NOSIGNAL, NULL, 0) = 86
rt_sigreturn()                          = -1 EINTR (Interrupted system call)
sendto(3, "<27>Jan 24 07:00:33 dsc[3482]: unable to pcap thread run: system error, check errno", 83, MSG_NOSIGNAL, NULL, 0) = 83
sendto(3, "<27>Jan 24 07:00:33 dsc[3482]: system error [4]: Interrupted system call (select())\n", 84, MSG_NOSIGNAL, NULL, 0) = 84
exit_group(1)                           = ?
+++ exited with 1 +++

@jelu jelu added the bug label Jan 24, 2017
@jelu jelu closed this as completed in 950ea96 Jan 24, 2017
jelu added a commit that referenced this issue Jan 24, 2017
Fix #133: Return from `Pcap_run()` on signal/errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants