Re: [patch 2/5] signalfd v4 - signalfd core ...
From: Davide Libenzi
Date: Thu Mar 08 2007 - 21:22:28 EST
On Thu, 8 Mar 2007, Davide Libenzi wrote:
> +static ssize_t signalfd_read(struct file *file, char *buf, size_t count,
> + loff_t *ppos)
> +{
> + struct signalfd_ctx *ctx = file->private_data;
> + struct sighand_struct *sighand = ctx->sighand;
> + ssize_t res = 0;
> + int signo = 0;
> + siginfo_t info;
> + DECLARE_WAITQUEUE(wait, current);
> +
> + if (count < sizeof(struct signalfd_siginfo))
> + return -EINVAL;
> + spin_lock_irq(&sighand->siglock);
> + if (unlikely(sighand != ctx->tsk->sighand))
> + goto out_unlock;
> + res = -EAGAIN;
> + if ((signo = dequeue_signal(ctx->tsk, &ctx->sigmask, &info)) != 0 &&
Grrr, never change the code after you tested it. The above is clearly:
if ((signo = dequeue_signal(ctx->tsk, &ctx->sigmask, &info)) == 0 &&
...
- Davide
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/