| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | locking() |
Sun 2002-11-17 01:52, Stas Degteff (2:5080/102.1) wrote to andrew clarke:
ac>> rc = locking(fd, LK_LOCK, 1);
ac>> if (rc != 0)
ac>> {
ac>> perror("locking: " FILENAME);
ac>> }
ac>> assert(rc == 0);
> next operators can't run: rc eq zero always (if rc not zero perror()
> called before this line)
No. I think you're assuming here that perror() will exit the program if
there is an error. But it will continue. That was why assert() was used.
#include
#include
int main(void)
{
perror("Hello");
puts("Fell through!");
return 0;
}
17:23 voodoo [e:\devel\csource\perror]perror.exe
Hello: Error 0
Fell through!
Now, how do I get _locking() to work in MingW32?!
-- mail{at}ozzmosis.com
--- Msged/NT 6.1.1
* Origin: Blizzard of Ozz, Mt Eliza, Victoria, Australia (3:633/267)SEEN-BY: 633/270 @PATH: 633/267 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.