/proc/$$/fd mystery - {t,}csh vs. bash

Michael ODonnell michael.odonnell at comcast.net
Thu Jan 8 22:38:08 EST 2009



> Because on startup /bin/csh dups stdin/out/err to higher fds...
	[...]
> this means /bin/csh uses FDs 16,17,18 as it's stdin/out/err instead
> of 0/1/2.
	[...]
> when running a program: after clone(), it just dup()s back to
> stdin/out/err before exec():

Cool - thanks for the analysis.  Why might they be doing this?
 


More information about the gnhlug-discuss mailing list