🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #11854

Re: Unix V7 functionality under (or along with) AmigaDOS? (*LONG*)

#11854
From: Peter da Silva
Date: Thu, 16 Mar 1989 11:27
30 lines
1701 bytes
In article <DEVEN.89Mar15164239@daniel.pawl.rpi.edu>, deven@pawl.rpi.edu (Deven Corzine) writes:
> In article <3626@sugar.hackercorp.com> peter@sugar.hackercorp.com (Peter da Silva) writes:
>  >Ah, pretty please. If you do nothing else in 1.4 could you let us dup()
>  >filehandles, and track them so I can pass a FH to a process and not have
>  >to worry about getting it back to close it?

> Why can't you, if the program you pass it to closes it?

I'm working on a shell (it's called "browser"). The program I pass
it to does not, in general, know that I want them to close it.

>  >I can deal with untracked memory, but there's ever so much UNIXy code out
>  >there that expects UNIX file descriptor semantics...

> Surely so.  Got a simple example in mind?

Surely. Any UNIX program that does I/O redirection.

	if(!fork()) {
		close(0);
		fd = open("/tmp/workfile", 1);
		if(fd!=0) exit(1);
		execl("/usr/peter/bin/output", "output", (char *)0);
		exit(2);
	}

No need to do ANYTHING to clean up /tmp/workfile.
-- 
Peter "Have you hugged your wolf today" da Silva      `-_-'
...texbell!sugar!peter, or peter@sugar.hackercorp.com  'U`
Technical Details
Message-ID: <3632@sugar.hackercorp.com>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!csd4.milw.wisc.edu!leah!bingvaxu!sunybcs!rutgers!bellcore!texbell!sugar!peter
References: <DEVEN.89Mar6082649@daniel.pawl.rpi.edu> <0776.AA0776@julie> <DEVEN.89Mar15164239@daniel.pawl.rpi.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!ames!mailrus!csd4.milw.wisc.edu!leah!bingvaxu!sunybcs!rutgers!bellcore!texbell!sugar!peter
From: peter@sugar.hackercorp.com (Peter da Silva)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Unix V7 functionality under (or along with) AmigaDOS?  (*LONG*)
Message-ID: <3632@sugar.hackercorp.com>
Date: 16 Mar 89 11:27:39 GMT
References: <DEVEN.89Mar6082649@daniel.pawl.rpi.edu> <0776.AA0776@julie> <DEVEN.89Mar15164239@daniel.pawl.rpi.edu>
Organization: Sugar Land Unix - Houston
Lines: 30