lkml.org 
[lkml]   [2003]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFD] Combined fork-exec syscall.
This is not the point.


4/27/03 11:42:15 PM, Werner Almesberger <wa@almesberger.net> wrote:

>Mark Grosberg wrote:
>> fmap[0] = in[0]; /* STDIN */
>> fmap[1] = out[1]; /* STDOUT */
>> fmap[2] = open("/dev/null", O_RDWR); /* STDERR */
>> fmap[3] = -1; /* end */
>>
>> p = nexec("/bin/cat",
>> null_argv,
>> NULL,
>> filmap);
>
>How about
>
> fdrplc(3,fmap);
> exec("/bin/cat",...);
>
>?
>
>0) System call names must be short and cryptic :-)
>1) Requiring the kernel to iterate over the array element by element
> in order to find out how big it is may be inefficient. Better to
> pass the length.
>2) System call overhead is marginal, particularly in this case.
>3) There may be other uses than exec(2), where a way for closeing
> all fds and getting a new set may be useful.
>
>- Werner
>
>--
> _________________________________________________________________________
> / Werner Almesberger, Buenos Aires, Argentina wa@almesberger.net /
>/_http://www.almesberger.net/____________________________________________/
>-
>To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>Please read the FAQ at http://www.tux.org/lkml/
>
>
Rafael Costa dos Santos
ThinkFreak Com
\
 
 \ /
  Last update: 2005-03-22 13:35    [from the cache]
©2003-2011 Jasper Spaans