Re: O_ACCMODE

2002-04-02 Thread Mark-Jason Dominus
> You probably already found out, but > > HP-UX 10.20 Has it defined as 003 > HP-UX 11.00 Has it defined as 003 > AIX 4.3.3.0 Has it defined as 3 > AIX 4.2.1.0 Has it defined as 3 Thanks for the information. It turns out some Win32 systems don't have it at all, so I have to avo

O_ACCMODE

2002-03-31 Thread Mark-Jason Dominus
Supposing that Fcntl and O_RDONLY are known to be available, how likely is it that O_ACCMODE will also be available? Are there any platforms that have O_RDONLY but not O_ACCMODE?

Re: How to test for the absence of an infinite loop?

2002-03-18 Thread Mark-Jason Dominus
> I just thought of a clever way to do it without alarm! So clever, it doesn't work! > lock_file($foo); > open(FH, $foo); > ok( !flock(FH, LOCK_NB | LOCK_EX) ); Seriously, on most unix systems, the following: flock(FH, LOCK_EX); flock(FH, LOCK_EX|LOCK_NB) or die;

Re: How to test for the absence of an infinite loop?

2002-03-18 Thread Mark-Jason Dominus
Michael The Schwern <[EMAIL PROTECTED]> says: > Use alarm and skip the test if $Config{d_alarm} is false (see > t/op/alarm.t for an example). If you think the infinite loop is due > to a programming glitch, as opposed to a cross-platform issue, this > will be enough. Thanks very much! > The on

How to test for the absence of an infinite loop?

2002-03-17 Thread Mark-Jason Dominus
I've just found a bug in my module. The bug results in an inappropriate infinite loop. Before I fix the bug, I want to write up a test case. I can reproduce the bug OK, but if I put that code into the module tests, and the bug isn't fixed, or comes back for some reason, then the test program w