Path: 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: <0776.AA0776@julie> Organization: Sugar Land Unix - Houston Lines: 30 In article , 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`