goto out_unlock_fown;
read_lock(&tasklist_lock);
- if ( (pid > 0) && (p = find_task_by_pid(pid)) ) {
- send_sigio_to_task(p, fown, fd, band);
- goto out_unlock_task;
+ if (pid > 0) {
+ if (p = find_task_by_pid(pid)) {
+ send_sigio_to_task(p, fown, fd, band);
+ }
+ } else {
+ for_each_task_pid(-pid, PIDTYPE_PGID, p, l, pidptr) {
+ send_sigio_to_task(p, fown, fd, band);
+ }
}
- for_each_task_pid(-pid, PIDTYPE_PGID, p, l, pidptr)
- send_sigio_to_task(p, fown,fd,band);
-out_unlock_task:
read_unlock(&tasklist_lock);
-out_unlock_fown:
+ out_unlock_fown:
read_unlock(&fown->lock);
}
ret = 1;
read_lock(&tasklist_lock);
- if ((pid > 0) && (p = find_task_by_pid(pid))) {
- send_sigurg_to_task(p, fown);
- goto out_unlock_task;
- }
- for_each_process(p) {
- int match = p->pid;
- if (pid < 0)
- match = -p->pgrp;
- if (pid != match)
- continue;
- send_sigurg_to_task(p, fown);
+ if (pid > 0) {
+ if (p = find_task_by_pid(pid)) {
+ send_sigurg_to_task(p, fown);
+ }
+ } else {
+ for_each_task_pid(-pid, PIDTYPE_PGID, p, l, pidptr) {
+ send_sigurg_to_task(p, fown);
+ }
}
-out_unlock_task:
read_unlock(&tasklist_lock);
-out_unlock_fown:
+ out_unlock_fown:
read_unlock(&fown->lock);
return ret;
}