-
Notifications
You must be signed in to change notification settings - Fork 34
pkill: implement --queue
#457
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
Conversation
7b9af1a to
73ee796
Compare
73ee796 to
7440279
Compare
7440279 to
2c9c9a6
Compare
887761d to
5bfc7b1
Compare
|
could you please add a test ? |
|
Common distributions do not have commands to detect output queues. The tool mentioned above is written in C++. It might be difficult to test if it really working only with rust tests. btw, #include <string.h>
#include <signal.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
void handler(int, siginfo_t *, void*);
int main(int argc, char *argv[])
{
printf("I'm %d\n", getpid());
struct sigaction act;
act.sa_sigaction = handler;
sigemptyset(&act.sa_mask);
act.sa_flags = SA_SIGINFO;
if(sigaction(SIGINT, &act, NULL) < 0) {
perror("sigaction error");
exit(0);
}
for(; ;)
pause();
return 0;
}
void handler(int sig, siginfo_t *info, void *ctx)
{
printf("recv a sig = %d data = %d data = %d\n", sig, info->si_value.sival_int, info->si_int);
} |
|
added a simple test for invalid input. |
9ceaebb to
4f1d753
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #457 +/- ##
===========================
===========================
☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4f1d753 to
3d5bcda
Compare
|
fixed. |
|
Thanks! |
wrote a tool to test: