LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: David Schwartz <davids@webmaster.com>
To: <alex@pennace.org>, Neil Brown <neilb@cse.unsw.edu.au>
Cc: Bernd Eckenfels <ecki@lina.inka.de>, <linux-kernel@vger.kernel.org>
Subject: Re: Desperately missing a working "pselect()" or similar...
Date: Fri, 5 Oct 2001 16:43:09 -0700	[thread overview]
Message-ID: <20011005234310.AAA24657@shell.webmaster.com@whenever> (raw)
In-Reply-To: <20011005193049.A6981@buick.pennace.org>



>> A technique I used in a similar situation once went something like:  

>> tv.tv_sec=bignum;
>> tv.tv_usec = 0;
>> enable_signals();
>> select(nfds, &readfds,&writefds,0,&tv);

>> and have the signal handlers set tv.tv_sec to 0. (tv is a global
>>variable).

>I've thought about that, but I haven't been able to find any guarantee that
>there will be no user space futzing around with &tv, like a library wrapper
>that copies tv to another spot in memory and invokes the syscall with that
>address.

	This will commonly happen if, for example, the user-side timeval structure 
contains seconds and microseconds and the kernel-side structure contains 
seconds and nanoseconds. The signal might occur after the library has 
performed the structure conversion.

	DS



  reply	other threads:[~2001-10-05 23:43 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-05 15:36 lkv
2001-10-05 16:19 ` Alexander Viro
2001-10-05 16:28   ` lkv
2001-10-05 16:36 ` Christopher Friesen
2001-10-05 16:40   ` lkv
2001-10-05 20:37 ` Bernd Eckenfels
2001-10-05 23:05   ` Alex Pennace
2001-10-05 23:13     ` Alan Cox
2001-10-05 23:52       ` Alex Pennace
2001-10-05 23:22     ` Neil Brown
2001-10-05 23:30       ` Alex Pennace
2001-10-05 23:43         ` David Schwartz [this message]
2001-10-06  0:03       ` Alan Cox
2001-10-08 16:32 lkv
2001-10-08 16:44 ` Alan Cox
2001-10-08 17:06   ` lkv
2001-10-08 17:24     ` Alan Cox
2001-10-09 13:37 ` Jan Hudec
2001-10-13 16:05   ` Jamie Lokier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011005234310.AAA24657@shell.webmaster.com@whenever \
    --to=davids@webmaster.com \
    --cc=alex@pennace.org \
    --cc=ecki@lina.inka.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    --subject='Re: Desperately missing a working "pselect()" or similar...' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).