Re: why does dash save, dup, and restore redirected descriptor in the parent, rather than redirect in the child?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 31/01/2017 21:00, Mark Galeck wrote:
Why save, dup and dup again to restore, descriptors in the parent, when it would be much simpler to just dup in the child, and not have to save and restore.

This assumes there's a child in the first place. Depending on the command, that might not be the case, think of built-in commands such as echo for instance. Code is needed to handle that case, and I suspect that if that code is there anyway, then having one place to set up redirections is simpler than having two places to set up redirections.

Cheers,
Harald van Dijk
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux