delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/08/11:12:54

Date: Sun, 8 Jun 1997 18:10:56 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Peter J. Farley III" <pjfarley AT dorsai DOT org>
cc: djgpp AT delorie DOT com
Subject: Re: Why not fork() etc. specific for for shell usage?
In-Reply-To: <339787eb.2387875@news.dorsai.org>
Message-ID: <Pine.SUN.3.91.970608181016.14590O-100000@is>
MIME-Version: 1.0

On Fri, 6 Jun 1997, Peter J. Farley III wrote:

> Why can't DJGPP implement sufficient tasking to just support shell
> pipes and redirection, which only involve standard I/O, and
> synchronous subshells for () and `` operations?  IOW, there would be
> no need to support message passing, named pipes, etc. (the hard
> stuff).  Asynchronous process support would not be needed, since most
> shell scripts don't need or use it.  At the very least, this would
> make *building* unix-based software more standard in the DJGPP
> environment, IMHO.

Sorry, I've read your clarifications to Chris Croughton, but I still
fail to understand what functionality is in your opinion missing in
DJGPP as it is.  Are you talking about making pipes and `command`
expansion work in a way other than temporary files?  If so, why is
this so important?  Point your $TMPDIR to a RAM drive and viola! you
get memory moves instead of disk I/O!  I think the amount of hacking
that you'll need to implement true pipes is enormous, and the benefits
are minimal if you aren't going to support true multi-processing
(i.e., the programs will still run serially).  Making such pipes work
only for DJGPP programs (as opposed for any DOS program spawned by a
DJGPP program) might be easier, but I'm not sure it is worthwhile,
although I do agree it is an interesting project...

The way DJGPP works now, you need to set SHELL=%DJDIR%/bin/sh.exe, and
you then miraculously get support for all these features when you call
`system' (it will just call Bash to do everything).  What disadvantages
do you see here that require additional functionality?  It is good
enough IMHO to allow building Unix-based software; I'm using the DJGPP
tools for almost a year to build all the GNU packages on a plain DOS
machine.

Please also note that the *syntax* for pipes and command expansion is
implemented in Bash anyway, the kernel or the C library on Unix don't
know anything about | and `` being special.  If you want libc.a to
support this syntax, you will have to add a parser for it to
`system'.  Apart of the syntax, the ``-style command expansion can be
implemented in DJGPP right now, by using the `popen' function.  Only
true pipes cannot be supported easily.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019