delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2011/07/13/14:30:17

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
From: Rugxulo <rugxulo AT gmail DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Pipe()
Date: Wed, 13 Jul 2011 11:14:51 -0700 (PDT)
Organization: http://groups.google.com
Lines: 43
Message-ID: <554b20d9-38c3-4a0b-9769-01cf2cc59884@w24g2000yqw.googlegroups.com>
References: <639f9631-f9d6-42b8-bf70-f943afe5afa8 AT n28g2000vbs DOT googlegroups DOT com>
<d87c0a0f-09dd-4f0d-a175-78399d1f4ccb AT g12g2000yqd DOT googlegroups DOT com> <9b97a0e5-b352-406d-9504-9947629f7d69 AT s17g2000yqs DOT googlegroups DOT com>
NNTP-Posting-Host: 65.13.115.246
Mime-Version: 1.0
X-Trace: posting.google.com 1310580974 6702 127.0.0.1 (13 Jul 2011 18:16:14 GMT)
X-Complaints-To: groups-abuse AT google DOT com
NNTP-Posting-Date: Wed, 13 Jul 2011 18:16:14 +0000 (UTC)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: w24g2000yqw.googlegroups.com; posting-host=65.13.115.246; posting-account=p5rsXQoAAAB8KPnVlgg9E_vlm2dvVhfO
User-Agent: G2/1.0
X-Google-Web-Client: true
X-Google-Header-Order: UHALERCNK
X-HTTP-UserAgent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.9.168 Version/11.50,gzip(gfe)
Bytes: 2997
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id p6DIU24o023165
Reply-To: djgpp AT delorie DOT com

Hi,

On Jul 13, 3:28 am, Georg <dos DOT  DOT  DOT  AT googlemail DOT com> wrote:
>
> I looked at it again, the package is doing first a pipe() to establish
> the communication and then a fork() to spawn the process in a new
> daemon. Basically you can only use these functions if you have a multi-
> tasking operating system. Eli is absolutely right here.

DR-DOS 7.03 can multitask (with its own EMM386 and DPMI loaded), and
it's compatible with DJGPP.

See here:

http://www.drdos.com/dosdoc/
http://www.drdos.com/dosdoc/multtask/02mtch2.htm

Also, there's RDOS, which is free for non-commercial use, which may be
interesting, but I haven't tried it (and it prefers OpenWatcom):

http://www.rdos.net/rdos/index.htm

> A pipe() function seems to be in the libsupp library now and also
> there is a pipe() function in pth/pthreads but I do not understand
> that implementation.

libsupp seems to emulate a pipe using a temporary file. GNU pth is
cooperative only, so that's presumably not what you want.

> A fork() as fas as I know is not implemented with DJGPP. One may be
> able to convert the fork() in the package to a pthread_create() but I
> doubt that will work well in the end.

Well, I don't know what your goal is, so I can't say what replacements
are available. Like I said, be sure to search around, somebody may've
already done it (for DOS).

> I will have to see what can be done here. I may just statically link
> the functions of the to-be-spawned program with the main program and
> convert the socket communication to function calls. However, this then
> needs to be done for every new version of this package.

Whatever works!   ;-)

- Raw text -


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