bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: awk porting for platform without fork?


From: Aharon Robbins
Subject: Re: awk porting for platform without fork?
Date: Fri, 26 Jan 2007 11:07:24 +0200

In article <address@hidden> you write:
>> Date: Tue, 23 Jan 2007 10:31:15 +0800
>> From: "Alvis Koon" <address@hidden>
>> 
>> I would like to port awk to an environment without fork.
>
>What environment is that?
>
>> Is it possible?
>
>Yes.  Gawk already supports a couple of environments like that.
>
>> And how much work is required.
>
>Not much.  If your environment supports running the configure script,
>perhaps none at all, as the configure script will take care of
>everything for you.
>
>> Why awk use fork?  Can awk run without fork support?
>
>Gawk uses fork for some obscure features like &| pipes.  Without fork,
>these will simply be unsupported.

Gawk also uses fork() for standard features like

        system("some command")
        "some command" | getline x
        print "data" | "some command"

Brian Kernighan's awk uses fork() under the hood, through calls to popen() 
and/or system().
-- 
Aharon (Arnold) Robbins --- Pioneer Consulting Ltd.     arnold AT skeeve DOT com
P.O. Box 354            Home Phone: +972  8 979-0381    Fax: +1 206 350 8765
Nof Ayalon              Cell Phone: +972 50  729-7545
D.N. Shimshon 99785     ISRAEL




reply via email to

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