Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14663
| From | dirk+bash@testssl.sh |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: bash sockets: printf \x0a does TCP fragmentation |
| Date | 2018-09-25 16:13 +0200 |
| Message-ID | <mailman.1299.1537884797.1284.bug-bash@gnu.org> (permalink) |
| References | (2 earlier) <714e1ba0-0052-2f2b-676d-778f2b7129c1@testssl.sh> <20180922111950901701520@bob.proulx.com> <948d4864-8808-9ce4-cc1e-2cce68256897@case.edu> <bd1b9a9c-a515-3900-a7b3-17548694d4df@testssl.sh> <faaed40d-d4af-5c2e-0cfe-c2c7db89eecd@case.edu> |
On 9/25/18 3:46 PM, Chet Ramey wrote: > On 9/25/18 9:04 AM, dirk+bash@testssl.sh wrote: > >> FYI: I ended up checking with type before whether an external printf >> exists and set a variable for this and then just call this variable. >> >> env or exec: never thought about it (thanks!) but as both are external >> commands, that would mean upon every call one additional external program. >> (yes, I know that there is such thing as a fs buffer). Subshells also costs >> resources. As this is a core function I am happy for every homeopathic dose >> of time I safe here :-) > > `exec' is a shell builtin. It will `cost' in terms of a fork, but you're > going to fork and exec a different program anyway -- /usr/bin/printf -- > so it's basically a wash. In either case, there's one fork and one > execve. yeah, you're right.
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Re: bash sockets: printf \x0a does TCP fragmentation dirk+bash@testssl.sh - 2018-09-25 16:13 +0200
csiph-web