Tom,

>>> /proc/self/fd is there on Linux but it's not there on Mac OS. However, 
>>> they ported the file descriptor access part of /proc to /dev/fd on Mac 
>>> OS.  On Linux /dev/fd is a link to /proc/self/fd. /dev/fd is actually 
>>> there on Solaris 10 too, but it appears to have different semantics 
>>> (looks like all fds rather than just the open ones).
>>
>> What about trying /proc/self/fd first, and if it doesn't exist, then try
>> /dev/fd/?  Is /dev/fd/ a directory on MacOS?
>>   
> yes. It has an entry for every open file descriptor, just like 
> /proc/self/fd. 
> The approach you suggest sounds good.

The spawn fix is needed for 2008.11 and the consensus on IRC this
afternoon is that the closefds stuff for Linux/MacOS would be nice to
have but not critical.  With that in mind, I'm going to implement spawn
only for Solaris right now.  I'll file a RFE for Linux/MacOS, including
the details we discussed today.  That'll ensure that none of this gets
lost, and we can implement spawn with relatively little additional
effort for these platforms in the near future.

Thanks,

-j
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to