[prog] making statements wait x number of seconds
John Clarke
johnc+linuxchix at kirriwa.net
Fri Sep 3 12:33:17 EST 2004
On Fri, Sep 03, 2004 at 02:56:46 +0200, Almut Behrens wrote:
> On Fri, Sep 03, 2004 at 09:50:40AM +1000, John Clarke wrote:
> > On Thu, Sep 02, 2004 at 04:56:53 +0200, Almut Behrens wrote:
> >
> > > methods. select has been around in Unix for a very long time. It should
> > > thus compile and run on anything unix-ish (not on Windows, though!).
> >
> > You *can* use select() on Windows with Cygwin (http://cygwin.com/).
>
> Well, yes... but I wouldn't necessarily consider Cygwin being a part
> of Windows -- more something like a rather heavy layer in between your
> Unix program and the Windows core functionality.
True, but it's still very useful. On the rare occasions when I need to
use a Windows machine I find it hard to do much without Cygwin. I'm too
used to having a real shell to work with.
> But as you brought up Cygwin, one should also mention MinGW, which is
I didn't mention it because I've never used it and don't know what it's
capable of doing.
> Also, I have to confess I considerably over-simplified things by saying
> select would not run on Windows. In fact, I may be wrong. There is a
> select() call as part of the winsock implementation:
There is. As you point out though, it's not quite the same as the Unix
or Cygwin versions. It *only* works with sockets, not with pipes,
files, etc.
> In case we're only interested in select()'s timeout facility, things
> might even work as expected... Anyone feel like trying?
No thanks. I'd bet on it not working though. That's usually the
safest bet to take on Windows :-)
Cheers,
John
--
You know the old adage about "three chords and the truth"? According to
several of my friends they've lowered the entrance requirements to two
chords and a couple of vague ideas. -- Joe Thompson
More information about the Programming
mailing list