This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Why is chmod in libgfortran implemented as fork/exec?


On Mon, Jul 07, 2008 at 01:54:49PM -0700, Andrew Pinski wrote:
>On Mon, Jul 7, 2008 at 1:44 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> Hi,
>>
>> It may be a dump question.  Why does libgfortran implement chmod intrinsic
>> with fork/exec? Why can't it call chmod () directly?
>
>Most likely because it has to parse the mode which is harder than
>doing a fork/exec :).

yes, but not all that hard nor too big :)
http://www.busybox.net/cgi-bin/viewcvs.cgi/*checkout*/trunk/busybox/libbb/parse_mode.c?content-type=text%2Fplain
   text	   data	    bss	    dec	    hex	filename
    480	      0	      0	    480	    1e0	libbb/parse_mode.o


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]