From: Phred Phungus on
Keith Thompson wrote:
> Phred Phungus <Phred(a)example.invalid> writes:
>> Jean-Rene David wrote:
>>> * PerlFAQ Server [2010.03.08 05:00]:
>>>> 8.21: Where do I get the include files to do ioctl() or syscall()?
>>> [...]
>>>> doesn't work perfectly, but it usually gets most of the job
>>>> done. Simple files like errno.h, syscall.h, and socket.h were
>>>> fine, but the hard ones
>>> Shouldn't this be:
>>>
>>> "Simple files like errno.h, syscan.h, and socket.h *work*
>>> fine, ..."?
>>>
>> I think so, but you snip a little too closely to make your case.
>>
>> Simple files like errno.h, syscall.h, and socket.h were fine, but the
>> hard ones like ioctl.h nearly always need to hand-edited.
>>
>> This probably wants to be:
>>
>> Simple files like errno.h, syscall.h, and socket.h work fine, but the
>> hard ones like ioctl.h nearly always need to be hand-edited.
>
> I think it says "were" rather than "are" because that paragraph is
> discussion h2ph in a historical context. In any case, the wording
> certainly needs to be corrected (another error: "to hand-edited"
> should be "to be hand-edited").
>
> A possible fix would be:
>
> Simple files like errno.h, syscall.h, and socket.h were fine, but the
> hard ones like ioctl.h nearly always needed to be hand-edited.
>
> if the intent is to emphasize that h2ph should no longer be used.


Gosh, the basic idea was that there had to be some agreement in the verb
tense, which can also be achieved in the past tense.
>
>> My question is how syscall is different from C's
>>
>> int status;
>> status = system("ls *");
>>
>> or
>>
>> FILE *fp;
>> fp = popen ("ls *", "r");
>>
>> If I'm to rely on my own eyes reading syscall in _Programming Perl_, I
>> would say they were completely disparate notions.
>
> Yes, they're completely different things with an unfortunate
> similarity in names.
>
> A "system call" in a Unix-like system is an entry point into the
> kernel. "man 2 intro" for more information. System calls are
> distinct from library calls, which are ordinary function calls.
> (System calls are typically done via library-level wrapper
> functions.)
>
> A "system call" is entirely distinct from a call to the "system()"
> function; "system()" is a library routine, and a call to it is a
> library call, not a system call.
>
> The word "system" in "system call" refers to the kernel, the
> innnermost core of the operating system. The "system()" function,
> on the other hand, provides access to a much higher user-visible
> level of the operating system.
>

Ok. thx keith. I think I understand. *
--
fred

*caveat: I may not understand.