bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 07/21] find_executable: port to EMX


From: KO Myung-Hun
Subject: Re: [PATCH 07/21] find_executable: port to EMX
Date: Wed, 03 Dec 2014 16:02:50 +0900
User-agent: Mozilla/5.0 (OS/2; Warp 4.5; rv:10.0.6esrpre) Gecko/20120715 Firefox/10.0.6esrpre SeaMonkey/2.7.2

Hi/2.

Bruno Haible wrote:
> KO Myung-Hun wrote:
>> BTW, do you mean to put URL into a source as a comment ?
> 
> Yes, this is what I mean. Rationale: Most gnulib developers don't
> have this reference handy, and a Google search did not provide
> the URL that you found.
> 

Strange. I found this URL by googling.

>>> Reliability: Please don't ignore the return value of DosGetInfoBlocks.
>>>
>>
>> DosGetInfoBlocks() returns no values.
> 
> Well, the URL that you showed describes its return value as
> "APIRET    ulrc;   /*  Return Code. */"
> 

You should have clicked the link. Then you could see this.

-----
 ulrc (APIRET) - returns

    Return Code.

    DosGetInfoBlocks returns no values.
-----

Anyway I added codes to check a return value.

> And the code in 
> http://dennisdarland.com/russell_doc/html/os__dep_8c-source.html
> and in 
> http://cpansearch.perl.org/src/JHI/perl-5.7.1/os2/OS2/Process/Process.xs
> do check the return value.
> 
> And http://www.gladir.com/CODER/COS2/dosgetinfoblocks.htm
> describes that a return value == NO_ERROR means success.
> 

I think, it means it returns only 0.

> Even when (or especially when) you don't know under which conditions a
> system function can fail, you should check its return value. Code that
> does not follow this policy becomes unreliable and undebuggable, in the long
> run.
> 

Absolutely.


-- 
KO Myung-Hun

Using Mozilla SeaMonkey 2.7.2
Under OS/2 Warp 4 for Korean with FixPak #15
In VirtualBox v4.1.32 on Intel Core i7-3615QM 2.30GHz with 8GB RAM

Korean OS/2 User Community : http://www.ecomstation.co.kr

Attachment: 0001-find_executable-port-to-EMX.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]